Did you know a large number of GNU Open Source command line utilities are available for Windows? See this list for what’s available. Under Unix/Linux, there are certain command line goodies I use quite often. Nothing in Windows Land comes close.
CoreUtils — The primary item here is ls
. Not simply because I can’t get used to using the old DOS dir
command, but the way the results are displayed is different, and I prefer the format from ls
. There are other normal shell commands there, too, mostly useful in the Unix style scripting.
File — Without fail, this thing can always tell me exactly what type or contents are in any given file. So, if I want to save a copy of that Flash video in my browser cache, it’s easy from the command line to check the largest of those files and it will tell me which one can be renamed with the proper extension .swf
. It’s also one of the best ways of checking a file’s contents and format when somehow the names get borked: file somefile
comes back with a report of the file type.
Grep — This allows me to hunt through a batch of files for a particular reference, provided I can recall a key word or exact phrase. It parses them far more quickly than the Windows indexing service: grep "some phrase" ./
means find all the occurrences of “some phrase” in the current directory.
Units — Simply one of the best command line tools ever, this allows me to convert between various measuring systems, including length, mass, volume and a ton of things I’ll never use. It’s interactive; just call it up and the prompt will ask what you have. Using standard abbreviations, it will usually recognize what you mean (for example, “10 inches”) and ask what unit of measure you want instead (for example, “cm”) and it spits out the answer in several ways. You’ll have to remember to kill the utility manually when you are done, using CTRL+C
.
You can pick some others, but I’ll leave it up to you to figure out what each of them does and how to use them.
Each of these packages installs in the same directory (I recall one of them hangs and you have to use Task Manger to kill it, but it works). So you have to add that directory to your PATH statement. In most versions of Windows, that’s under “My Computer.” Right-click and select “Properties” then look for something indicating Advanced System Settings. In Win7, you get a window with tabs; select “Advanced.” Then click the button for Environment Variables. In the list box at the bottom, find “PATH” and click the “Edit” button. It will open a box with a huge long string. You are going to add to the end of that, so hit your END key.
Make sure you don’t add any spaces. Type a semi-colon (;) and add this:
C:\Program Files\GnuWin32\bin\
or whatever is equivalent on your system after you install the packages. For 64-bit systems, you probably know it’s more like “Program Files (x86)”. At any rate, for those of you who are jonesing for a command line fix, now you know where to find your supply.