UnxUtils

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/
ansi2knr.exe  
basename.exe  
bison.exe  
bzip2.exe Julian Seward’s alternative compressor
bunzip2.exe  
bzip2recover.exe  
cat.exe  
chgrp.exe dummy
chmod.exe  
chown.exe dummy
cksum.exe  
cmp.exe  
comm.exe  
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
csplit.exe  
cut.exe  
date.exe  
dd.exe  
df.exe dummy
diff.exe  
diff3.exe  
dirname.exe  
du.exe  
echo.exe  
egrep.exe  
env.exe dummy
expand.exe  
expr.exe  
factor.exe  
fgrep.exe  
find.exe
  • Example of command line under Cmd/Command shell:
    find -name *.txt -exec cat {} ;
flex.exe  
fmt.exe  
fold.exe  
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.
grep.exe  
gsar.exe  
gunzip.exe  
gzip.exe  
head.exe  
id.exe dummy
install.exe  
join.exe  
less.exe  
ln.exe works only on NT, does real hardlinks on NTFS
logname.exe  
ls.exe  
m4.exe  
md5sum.exe  
mkdir.exe  
mkfifo.exe dummy
mknod.exe dummy
mv.exe  
mvdir.exe  
nl.exe  
od.exe  
paste.exe  
patch.exe  
pathchk.exe  
pr.exe  
printenv.exe  
printf.exe  
ptx.exe  
recode.exe  
rm.exe  
rman.exe PolyglotMan by Thomas A. Phelps ( source)
rmdir.exe  
sdiff.exe  
sed.exe  
seq.exe  
sleep.exe  
sort.exe  
sh.exe renamed zsh – this is no replacement for the Cygwin bash
shar.exe only works with -T (text) option
split.exe  
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.
su.exe dummy
sum.exe  
sync.exe  
tac.exe  
tail.exe  
tar.exe
  • only forward slashes are accepted
  • the -z option (compression) does not work
  • no remote archives
  • works only on NT, does real hardlinks on NTFS
tee.exe  
test.exe  
touch.exe  
tr.exe  
uname.exe  
unexpand.exe  
uniq.exe  
unrar.exe This is unrar 3.00 beta 7, which seems to have been “free”. Works good enough.
unshar.exe  
uudecode.exe  
uuencode.exe  
wc.exe  
wget.exe wget 1.8.2 builds out of the box with MS Visual C
which.exe does not search the current directory
whoami.exe  
xargs.exe  
yes.exe  
zcat.exe

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.

Downloads
UnxUtils (Download)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s