Unix utils for Windows

For a beloved project (and for few other possible reasons) I’ve dusted off my old laptop..  I needed to test some code on a windows platform.  The things I do for bettering humanity!

Leaving out the details of the viral contamination that cost me a good 8 hours of productivity, I found it interesting to revisit XP after three months of OS X use.  I have to say, I forgot about some of the many, many little (and moderate) nuisances and, upon experiencing them again, I wonder how I could ever have put up with them.  I wondered if I was on candid webcam for a while as I repeatedly clicked the little popup balloon that said “There are updates…”  It disappeared for a split second only to return again and again.  Who needs that?

Anyway, after reformatting the hard drive and reinstalling XP (since MSFT’s snazzy Windows Defender didn’t detect the problem, nor did anything else I tried) I got down to business.  Apart from typing ‘ls’ whenever I wanted a directory, I really needed to run a ‘tail -f’ against a log file to monitor and debug stuff.  I don’t know of a good alternative to this.  For those of you who haven’t employed this tool, just using ‘tail’ will output the last 10 lines of a file.  Occasionally useful.  But ‘tail -f’ will dump the last 10 lines of a file and keep it open.  Any new lines added to the file will be output to the screen.  Nothing better for watching log files.

So, where is tail?  It isn’t.  Very sad.  However, although there are some other alternatives out there like cygwin, which is impressive, I have used these natively compiled GNU utilities for a while now. They are Windows executables, and quite a few of them, that run without any external libraries.  You can copy as many as you want to somewhere in your path (I put them all in \windows\system32, but I love living dangerously).  If grep, bzip2, tar, and, oh, yeah, tail are your old friends, then enjoy.  If not, they’d love to meet you.

Oh, a nice executable included with the utils is pclip.exe.  This will dump the contents of the clipboard to standard output.  I bet this would be useful for someone… sometime.  And gclip.exe which does the opposite.  Very nice.  Enjoy!  And, if you have to use Windows.. I’m really sorry.

2 comments ↓

#1 seamonkey420 on 12.12.06 at 9:41 am

thats funny, i feel the opposite in regards to using OS X after Win XP but then again my mac is pretty crappy too (getting rid of once i get my new htpc up this week)

yes, cygwin is a great unix alternative for windows, also i used to use UWIN (a korn shell unix for windows) for testing a ton of batch scripting and kornshell.
http://www.research.att.com/sw/tools/uwin/

i might have to dig up cygwin again just to see if i got the skills!

ah.. the power of grep and tail.. :P

#2 Johnny on 12.13.06 at 11:26 am

I was reading an article earlier today about using pclip to sed to gclip… kinda cool idea.

pclip | sed “s/string1/string2/g” | gclip

Leave a Comment