I am constantly working en between windows and linux. This causes me some pretty frustrating issues when I’m working in the windows command line or in a linux terminal. For example, I prefer to use the commands ls, cat, less, grep and wget a LOT when I’m in the linux command terminal. So, when I’m working in windows, I’ll find myself typing those commands out of habit. Or, I’ll want to use the functionality of certain linux commands for scripts I write in windows. Wget is a great example of this. In the article I wrote on how to push android notifications to XBMC, I rely heavily on the functionality of wget and grep to make the script perform the way I want. For this I found a great, free, open source port of some key linux commands to the windows environment called UnxUtils.
I found this software some time ago, but I really only used it for the robust ls command. I find it’s much more versatile than the dir command that is provided by Microsoft from the DOS days. I also really prefer piping cat to less instead of using type piped to the more command. So, UnxUtils is a great collection of command ports for those that wish that windows command prompt were more like a sh or bash environment, this is your answer. Here is a list of the commands that have been ported to windows.
|agrep.exe||got it from here: http://www.tgries.de/agrep/|
|bzip2.exe||Julian Seward’s alternative compressor|
|compress.exe||for (de)compressing .Z files; this is actually a program called ncompress and was found on one of the Linux mirrors|
|cp.exe||works only on NT, does real hardlinks on NTFS|
|gawk.exe||input files are opened in text mode|
|make.exe||From v3.77 upwards, make searches for a sh.exe on the path. If it does not find one, it switches to win32 make mode that is it uses intermediate batch files for command processing.
This is fine until your makefile tries to execute something like mkdir, which will invoke the internal mkdir from cmd.exe or command.com. As the results may not be to your liking, you may prefer to use the sh.exe provide here.
|ln.exe||works only on NT, does real hardlinks on NTFS|
|rman.exe||PolyglotMan by Thomas A. Phelps ( source)|
|sh.exe||renamed zsh – this is no replacement for the Cygwin bash|
|shar.exe||only works with -T (text) option|
|stego.exe||stego -E encode.me -T words.txt
Encodes file encode.me as gibberish text using words from the words.txt file to stdout. If the -T option is omitted, stego looks for a file called “words” in the current directory. Of course, the -D option will decode the input file; remember to redistribute words.txt together with the encoded file.
The purpose of this program is to disguise binary files as a kind of text file or to drive your coworkers mad.
|unrar.exe||This is unrar 3.00 beta 7, which seems to have been “free”. Works good enough.|
|wget.exe||wget 1.8.2 builds out of the box with MS Visual C|
|which.exe||does not search the current directory|
As you can see this is a pretty comprehensive list of ported commands. And, if you know the way that linux commands are used you can use this software to greatly increase the power of your batch files without resorting to VBS Scripts and learning a whole new language. I prefer this method over the VBS route as you don’t have to call DLL files or use any programming handles to accomplish the the tasks that can be done with this software suite. I wholeheartedly recommend this collection to anyone who, like me, misses linux command functionality in the windows environment.