November 12, 2010
by Fardjad
It’s really annoying that you can’t use Unix commands in windows… fortunately there is a project on SourceForge called GnuWin that provides ports of tools with a GNU or similar open source license, to MS-Windows. Installing GnuWin utilities it quite easy and straightforward:
First download GetGnuWin32 from here and run it.
Accept the license agreement and then extract it at your desired location.
Then open Command Prompt. use cd command to navigate into the path you’ve extracted GetGnuWin32 files before.
Type download and press enter.
It automatically starts to download needed packages for installing GnuWin32.
Finally type install “c:\gnuwin32″ to install it on c:\gnuwin32:

Congratulations, you have successfully installed GnuWin32.
But wait… after the installation process finishes, this prompt shows up:
Optional:
You can ^*append^* the bin subdir of your installation folder to your PATH:
i.e. C:\gnuwin32\bin
There are a few gnu conflicts with Windows utilities, so make sure to ^*append^*.
That way the windows utilities take priority (i.e. sort^).
Of course you can append bin subdir to your PATH environment variable permanently. but It’s safer and easier to make a shortcut to cmd.exe with path set to “c:\gnuwin32\bin”:
Create a new shortcut in your desired location. in the “Type the location of the item” text box, type:
cmd /k path=%path%;c:\gnuwin32\bin
before we continue making our shortcut, let me explain the command above:
cmd opens command prompt.
/k following by a command, executes the specified command and continues running.
path=%path%;c:\gnuwin32\bin simply appends c:\gnuwin32\bin to current path.
now Click next. Choose a name for your shortcut (ex. GnuWin32 Command Prompt) and then click Finish.
Your shortcut is ready to use but, whenever you open it, it changes the current directory to your %windir% (ex. C:\WINDOWS) which is a bit uncomfortable. to fix this, Right-Click on the shortcut and select Properties. In Properties window clear the “Start in: ” field and click OK.

Well done
have fun.