This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
我认为 GnuWin32 项目正是您正在寻找的。 Unix 命令行工具移植到 Windows。
I think the GnuWin32 project is exactly what you're looking for. Unix command line tools ported to Windows.
我多年来一直在使用 UnxUtils ,它是常见 GNU 实用程序到本机 Win32 的端口。
我应该补充一点,我还使用过 Cygwin(等)和 Microsoft 的 Unix 服务,但它们对我来说都没有任何好处,因为它们的工作效果不如命令的本机版本提示,并且在 Windows 下使用 ksh/bash/whatever 从来都不会真正正常工作,即使我一直在 unix 下使用 ksh。
I've been using UnxUtils which are ports of common GNU utilities to native Win32 for ages.
I should add that I've also used Cygwin (et al.) and Microsoft's Services for Unix and neither of them were any good for me because they don't work as well as native versions from the command prompt, and using ksh/bash/whatever under Windows never really works right, even though I use ksh under unix all the time.
我经常尝试类似的方法,但说实话,没有一个真正有效。
因此,我建议使用虚拟机(例如 VirtualBox)并在其中安装一个小型 Linux。您可以使用共享文件夹轻松地将文件从来宾系统移入或移入来宾系统。
根据我的经验来看,这是我迄今为止使用过的最好的解决方案。
I tried something like this quite often, but to be honest, none of it really works well.
I therefore suggest using a virtual machine (such as VirtualBox) and install a small linux inside that. You can easily move files from and to the guest system with shared folders.
Judging by my experience, it is the best solution I used so far.
我尝试了 Gow 一段时间,效果很好。它为 Windows 提供了 130 个 Unix-shell 实用程序。文件资源管理器中的上下文菜单用于在当前文件夹中启动提示,非常方便。
I tried Gow for some time, and it's nice. It offers 130 Unix-shell utilities for Windows. The contextual menu in the File explorer, to start a prompt in the current folder, is really handy.
有一个许多实用程序的 GNU 端口。我发现这非常有用。
如果您需要 Perl,我推荐 Strawberry Perl。
There's a GNU port of many of the utils. I find that quite useful.
If you need Perl, I recommend Strawberry Perl.
这里建议的大多数工具的问题是它们不经常更新,例如 GnuWin32 的最后一次更新是在 2010 年 12 月 27 日; UnxUtils 的最后更新时间为2007 年 3 月 1 日。
我建议 MSYS2,一个非常好的选择,它有一个 Win32 端口 Arch 内置的 pacman 包管理系统。它是 Cygwin 的衍生品,就像 MSYS 一样,但比 MSYS(有很多软件包并且几乎每天更新)和 Cygwin(非常轻)要好得多。
这是一个在 Windows 下运行的滚动发布发行版,因此您可以获得最新、最好的软件包。 MSYS2 另外还有 MinGW,提供 x86 和 x86_64 版本。他们有自己的软件包列表 - MinGW 软件包。
维护人员也非常和蔼可亲。
The problem with most of the tools suggested here is that they don't get updated very often E.g. the last update GnuWin32 got was on 27 December 2010; UnxUtils was last updated on 01 March 2007.
I suggest MSYS2, a very good option which has a Win32 port of Arch's pacman package management system built-in. It's a spin-off from Cygwin like MSYS but much better than MSYS (lots of packages and gets updated almost daily) and (very light as opposed to) Cygwin.
It's a rolling release distribution that works under Windows and thus you get the latest and greatest of the packages. MSYS2 additionally has MinGW, provided in both x86 and x86_64 flavours. They've their own list of packages - MinGW packages.
Maintainers are very affable too.
对于那些觉得 CygWin 太过分的人来说,MSYS 是一个常见的替代方案。它仍然是一个特殊的提示符,但它最初的目的是设置足够的 Unix 兼容性,以便使用 MinGW 编译器和典型的配置/制作例程构建程序。
使用 sed 和 awk 等工具在正常的 Windows 命令提示符下不会像预期的那样工作。在某种程度上可以做到这一点,但常见用法涉及通常由 shell 解释的命令行语法,但 Windows 命令提示符不支持。一个例子是通配符文件规范。我经常发现以 Unix 为中心的工具在 Windows 上并不那么有用,因为它们假设 shell 已将这些通配符扩展为文件列表。
MSYS is a common alternative for people who find CygWin excessive. It's still a special prompt, but it was originally intended to set up just enough Unix-compatibility to build programs using the MinGW compilers and the typical configure/make routine.
Using tools like sed and awk isn't going to work quite as expected in a normal Windows command prompt. It can be done to a point, but common usage involves command-line syntax that is normally interpreted by the shell, but which the Windows command prompt doesn't support. One example is wildcard file specifications. I've often found that Unix-centric tools aren't as usable on Windows as they assume the shell has expanded those wildcards into lists of files for them.
安装 msysGit (netinstaller),它带有 (msys/minGW) shell 环境。
它还在资源管理器中添加了“此处打开外壳”。
它比 Cygwin 更快,但牺牲了 UNIX 兼容性。
Install msysGit (netinstaller), it comes with a (msys/minGW) shell environment.
It also adds a "open shell here" in explorer.
It's faster than Cygwin, but at the sacrifice of unix compatibility.
也许这很愚蠢,但我通常在谷歌上搜索即:“缩进窗口”。您可以从混合平台中选择工具。开放系统中的很多东西都被移植到了 Windows 上。
Maybe it is stupid, but I usually search google for i.e.: "indent windows". You can select tools from mixed platforms. Lot of stuff from open systems has been ported on windows.