GNU utilities for Win32


Here are some ports of common GNU utilities to native Win32. In this context, native means the executables do only depend on the Microsoft C-runtime (msvcrt.dll) and not an emulation layer like that provided by Cygwin tools.

Download:

by http: UnxUtils.zip

by ftp: ftp://ftp.uni-koeln.de

latest updates (after 10/10/00):  UnxUpdates.zip


The following program versions are covered:

bc-1.05
bison-1.28
bzip2-0.9.0b (not GNU)
diffutils-2.7
fileutils-3.16
findutils-4.1
flex-2.5.4
gawk-3.0.3
grep-2.3
gsar110
gzip-1.2.4
indent-2.2.0
jwhois-2.4.1
less-340
m4-1.4
make-3.77
patch-2.4
recode-3.5
rman-3.0.7
sed-3.02
shellutils-1.9.4
su.exe
tar-1.12
textutils-2.0
wget-1.5.2
which-2.4

Standard behaviour:

  • All programs open files in binary mode, while stdin, stdout and stderr are in text mode

  • forward as well as backward slashes in file paths are accepted

What is new:

  • I have added a hacked version (sh.exe) of the Almquist shell distributed with NetBSD running on native Win32. The shell has still some problems, but it should be good enough to run most makefiles with gnumake.
    The main problem at the moment comes from the restriction of pipes to a maximum of 1MB transfered data. This of course is because Win32 can not fork.

   08/26/99

  • Help files for many of the programs are available now via Bruce Wamplers VIDE site.

  • updated gzip/gunzip: the previous did not work on Win98 because it capitalizes the executable name in argv[0]

   09/30/99

  • Added indent-2.2.0

  • Added a link to the excellent zsh shell

  • updated mv, rm and ln: fixed a nasty bug that only turns up if you use forward slashes in file paths

  • updated sdiff.exe and diff3.exe: these used to invoke diff.exe using a full pathname causing unnecessary complications. The new versions use the PATH.

   10/20/99

  • updated mkdir and rmdir: fixed a nasty bug that only turns up if you use forward slashes in file paths

  • updated tar.exe: the previous version would not accept archive path names containing drive letters

  • updated bison to v1.28

   11/05/99

  • updated grep, egrep and fgrep: the -r option now works as intended

   11/11/99

  • updated tar.exe: stdin and stdout are now in opened in binary mode

  • patch.exe recompiled

  • the sh.exe is now really a renamed zsh, this is somewhat bulky but seems to works good enough

   02/19/00

  • For the time to come, the latest updates are here: UnxUpdates.zip

  • updated touch.exe. There was a sporadic problem when parsing the argument given to the -t option.

  • updated make to v3.78.1. I have dropped the gnumake name

  • updated xargs.exe: the maximum length of the command line now is 131072

  • recompiled env.exe

  • updated find: now uses forward slashes in paths

  • Source code release still on hold.

   03/03/00

  • make 3.78.1 needed a makeover: the old version had got sensitive for the case of file names

   04/26/00

  • date.exe updated: there were problems with the command line parsing, solved by recompiling.

   06/12/00

  • added jwhois 2.4.1

  • added gplay.exe, a console multimedia player (including MP3)

  • updated cp.exe and mkdir.exe: the old versions did not  honor the -p flag

   08/30/00

  • I have started an Open source code at http://unxutils.sourceforge.net. At the moment, there is only the CVS repository of all sources, even if the changes to the original GNU code are trivial. The repository can be accesses via anonymous CVS with the command
      cvs -d:pserver:anonymous@cvs.UnxUtils.sourceforge.net:/cvsroot/unxutils login

   10/10/00

  • New edition
    Updated zsh to the latest version

Program

Notes

ansi2knr.exe
basename.exe
bison.exe
bzip2.exe Julian Sewards alternative compressor
bunzip2.exe
bzip2recover.exe
cat.exe stdin and stdout opened in binary mode
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
ctags.exe (removed) you can get it from Darren Hieberts site or via the home page of the vim editor
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 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 stdin and stdout opened in binary mode
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
shar.exe only works with -T (text) option
split.exe
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
unshar.exe
uudecode.exe
uuencode.exe
wc.exe
wget.exe wget 1.5.3 builds out of the box with MS Visual C
which.exe does not search the current directory
whoami.exe
xargs.exe
xxd.exe
yes.exe

Additional programs

pclip.exe put the Windows clipboard text to stdout
gclip.exe get  the Windows clipboard text from stdin
Example: run the text from the clipboard through sed and put the result back
               pclip | sed "s/string1/string2/g" | gclip
gplay.exe My minimalist console multimedia player using DirectShow. With
gplay filename | URL
you should be able to play just everything as long as Microsoft supports it.

Links:

HTML man pages for the GNU utilities:
     http://www.delorie.com/gnu/docs
Another source of unixish stuff:
     http://www.itribe.net/virtunix/
A native GNU C++/Fortran compiler for Win32:
     http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs-mingw32.html
A zsh shell for Win32:
     ftp://ftp.blarg.net/users/amol/zsh
An emacs for NT:

   http://www.cs.washington.edu/homes/voelker/ntemacs.html
The CVS version control system:
   http://www.cvshome.org
Useful free NT system utilities:
     http://www.sysinternals.com
Native Perl on Win32:
     http://www.activestate.com
An Un*x emulation on Win32:
     http://sourceware.cygnus.com/cygwin/
A Cygwin compiled Perl:
     http://cygutils.netpedia.net
Another Un*x emulation on Win32:
     http://www.research.att.com/sw/tools/uwin/
A more real Un*x on Windows NT:
     http://www.interix.com/ (assimilated by Microsoft)


Read my standard disclaimer: (really?)
Last change on 10/10/00 by K. M. Syring (bug reports are welcome)
Original location of this page: http://www.weihenstephan.de/~syring/win32/UnxUtils.html