命令行工具

发布于 2024-09-07 06:31:05 字数 449 浏览 8 评论 0原文

我一直在浏览网站上的其他问题,但找不到列出一些最广泛使用(或主观上最好)的命令行工具的问题。

刚刚安装了 Mercurial,我对其他人正在使用的命令行工具很感兴趣。

那么您使用哪些命令行工具以及您更喜欢哪些?为什么使用它们以及它成为如此出色的工具的一些原因将非常有用。

我目前使用的是 Windows,因此基于 Windows 的命令行工具的建议将会有很大帮助。

更新:

我真正在寻找的是一些软件来替代 Windows 中内置的 cmd.exe。我们可以通过多种方式使用该软件,但我真的只是对人们使用的替代工具感兴趣。我发现 cmd.exe 很难使用,正在寻找一个好的替代方案。

更新2:

所以事实证明我的措辞略有偏差。我真正要问的是 Shell 或命令解释器。感谢所有回答的人。非常有帮助的回复。

I've been having a look through other questions on the site and can't find one listing out some of the most widely used (or subjectively best) command line tools.

Having just installed Mercurial I'm interested in what command line tools others are using.

So what command line tools do you use and which ones do you prefer? Some reasons for why you use them and what makes it such a great tool would be really useful.

I'm currently on Windows so suggestions for Windows based command line tools would be a great help.

UPDATE:

What I'm really looking for is some software to replace the built in cmd.exe in Windows. There are lots of ways we can use this software however I'm really just interested in what replacement tools people are using. I find cmd.exe quite hard to work in and am looking for a good alternative.

UPDATE 2:

So it turns out that my wording has been slightly off. The thing I'm really asking about is a Shell or Command Interpreter. Thanks to everyone who's answered. Very helpful responses.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

聆听风音 2024-09-14 06:31:05

一些我经常使用的:

iisreset :当我的 IIS 让我发疯时。

appcmd :编写 IIS 内容的脚本

robocopy :因为它比基本副本更详细

subst :当我的路径非常长时

net use :眨眼间映射共享

Some that I use quite often :

iisreset : When my IIS drives me crazy.

appcmd : To script IIS stuff

robocopy : Because it is usefully more verbose than the basic copy

subst : When i have horribly long paths

net use : To map shares in a blink of an eye

残月升风 2024-09-14 06:31:05

也许你所说的是一个shell,它是给你一个提示的程序,允许您输入命令并执行它们,并执行简单的类似编程的操作,例如操作参数、替换和迭代。 CMD.EXE 是 Windows 的内置 shell。

Cygwin 是一个在 Windows 上提供 Unix 风格 shell(“bash”)的软件包。它主要旨在支持 Unix 风格的环境(具有 Unix 风格的目录等),但也可用于运行 Windows 程序。 “bash”比 CMD.EXE 强大得多。几乎所有使用 Windows 的熟悉 Unix 的用户都安装了 Cygwin。

较新版本的 Windows 有一个名为 PowerShell 的较新 shell;我从未使用过它,但我只能假设它是对 CMD.EXE 的改进。

您最新的评论说“Console2”是您想要的,但从项目页面来看,它似乎只是一个控制台,这只是 shell 运行的窗口程序(具有更容易剪切和粘贴等功能) ,以及可配置的外观)。不过,默认情况下您可能仍然在运行 CMD.EXE。

Perhaps what you are talking about is a shell, which is the program that gives you a prompt, lets you enter commands and execute them, and carry out simple programming-like operations like manipulating arguments, substitution, and iteration. CMD.EXE is the built-in shell for Windows.

Cygwin is a package which provides a Unix-style shell ("bash") on Windows. It's mainly intended to support a Unix-style environment (with Unix-style directories, etc.), but can be used to run Windows programs as well. "bash" is far more powerful than CMD.EXE. Pretty much any Unix-accustomed user who's using Windows has installed Cygwin.

Newer versions of Windows have a newer shell called PowerShell; I've never used it but I can only assume it's a improvement over CMD.EXE.

Your latest comment says that "Console2" is what you wanted, but judging from the project page it appears to be just a console, which is just the window program that the shell runs in (granted with features such as easier cut-and-paste, and configurable appearance). You're still probably running CMD.EXE by default in it though.

太阳男子 2024-09-14 06:31:05

我认为你的问题太笼统了。命令行只是一种可用于各种应用程序的界面。

因此,您的问题类似于以下问题:您喜欢哪些应用程序?

对此的任何答案都将过于主观并且没有多大帮助。也许您应该问人们使用什么工具来实现特定目标?

编辑:

我现在更好地理解了误解:CMD 通常不被称为命令行工具。它是一个命令解释器。您正在寻找的是一个更好的命令解释器。

命令行工具是使用控制台作为界面的任何应用程序。

I believe your question is too general. The command-line is just a type of interface that can be used for all kinds of applications.

Thus your question is similar to the question: What applications do you prefer?

Any answer to this will be too subjective and not very helpful. Maybe you should ask what tools people use to achieve a specific goal?

EDIT:

I better understand the misunderstanding now: CMD is usually NOT called a command line tool. It is a command interpreter. What you were searching for was a better command interpreter.

A command line tool is any application that uses the console as an interface.

寂寞花火° 2024-09-14 06:31:05

命令行 git 似乎比可用的各种图形界面更可靠(并且在我看来)更容易使用。从命令行来看它也更加灵活。

Command line git seems to be much more reliable (and IMO) easier to use than the various graphical interfaces that are available for it. It's also way more flexible from the command line.

与君绝 2024-09-14 06:31:05

我一直使用 rsync - 当您需要在不同平台上构建和测试,以及当您需要通过慢速链接与远程文件系统同步时,它特别有用。

I use rsync all the time - it's particularly useful when you need to build and test on different platforms, and when you need to sync with remote file systems over slow links.

零崎曲识 2024-09-14 06:31:05

回答更新的问题 -

如果您不喜欢 cmd.exe 的批处理语言,那么 python 是一个很好的替代品。

至于适合 Windows 的命令行工具,有各种“unix 工具”包,它们提供了大多数核心 unix 命令行实用程序。例如,当您需要从巨大的日志文件中提取某些内容时,它们对于基本文本处理最有用。

Answering the updated question -

If you don't like the batch language of cmd.exe a good replacement would be python.

As for proper command line tools for windows, there are various "unix tools" packages which offer most of the core unix command line utilities. They are most useful for basic text processing when you need to extract something from a huge log file for instance.

維他命╮ 2024-09-14 06:31:05

如果我理解正确,请查看 Take Command/LE :

http://www.jpsoft.com/tcmdledes。 htm

或者您应该尝试 Windows PowerShell :

http://en.wikipedia.org/wiki/ Windows_PowerShell

If I understand you correctly check out Take Command/LE :

http://www.jpsoft.com/tcmdledes.htm

or you should try Windows PowerShell :

http://en.wikipedia.org/wiki/Windows_PowerShell

不一样的天空 2024-09-14 06:31:05

我相信 Windows PowerShell 是最好的选择。

另外,请在此处查看一堆有用的脚本:http://technet。 microsoft.com/en-gb/scriptcenter/powershell.aspx

I believe Windows PowerShell is the best option to go with.

Also, have a look here for bunch of useful scripts: http://technet.microsoft.com/en-gb/scriptcenter/powershell.aspx

爱*していゐ 2024-09-14 06:31:05

我在Win平台上使用UnxUtils。这些工具是为 Windows 环境重新编译的 Unix 工具。

它为您提供了许多 Unix 类型的工具(grep、sed、join 等),而无需安装整个环境的开销。

它有一段时间没有更新了,但对我来说效果很好。

I use UnxUtils on Win platform. These tools are Unix tools recompiled for the Windows environment.

It give you many Unix type tools (grep, sed, join etc), without the overhead of installing a whole environment.

It hasn't been updated for a while, but it works well for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文