A .tar.gz file is simply a bundle of files packaged with tar, and subsequently compressed with gzip.
Sometimes the extension ".tgz" is used as an abbreviation for ".tar.gz". This is especially common on platforms such as MS-DOS that have arbitrary constraints on filenames (no more than one dot, and no more than three characters after the dot).
The file extraction from the decompressed archive would be done using tar. Most unix-like operating systems come with an implementation of tar. The Free Software Foundation has a very good implementation called GNU tar. For detailed information on using GNU tar, please refer to the online documentation.
A nice feature of GNU tar is the ability to specify compression and decompression on the command line using the "-z" option, which causes GNU tar to automatically invoke GNU zip. Thus to extract files from foo.tar.gz, you would simply say "tar -xzf foo.tar.gz".
If you use a version of tar that does not have the "-z" option, you'll need to invoke it as "gunzip -c foo.tar.gz | tar -xf -", where the "-c" tells gunzip to write to standard output, the vertical bar tells the shell to pipe the output of gunzip into tar, and the "-" tells tar to read its input from the pipe.
Some operating systems may not support pipes, in which case you would have to do this in two steps. First decompress the file: "gunzip foo.tar.gz". This should leave the decompressed file as foo.tar. Then extract it using "tar -xf foo.tar".
There are versions of GNU gzip and GNU tar available for most platforms. Linux and most BSD Unix variants typically come with GNU gzip and GNU tar. For other operating systems you may be able to find precompiled binaries, or download the source code and build it yourself.
Windows command line and MS-DOS ports of GNU gzip and GNU tar are available from the unixutils project.
I used to provide files in ".zip" format as well, but I found that people would download both the .tar.gz and the .zip files, even though my web page pointed out that the actual content was identical and requested that people not download both. Since that's a waste of my internet bandwidth, I've decided to provide the files in only a single format, and the easiest for me to provide is .tar.gz.
I don't believe that it is particularly burdensome to expect people who want to use my software to obtain the appropriate utilities. It took me a lot of time to write these programs, and I have no interest in spending my own time helping people that can't be bothered to spend just a few minutes finding the utilities. If you think it's worth your effort to download my software, then it should also be worth your effort to equip your computer to extract it.
Several people have told me that they are offended by my attitude. That's fine, since I'm offended by theirs. They are quite welcome to find the programs they want somewhere else. I'm not forcing anyone to use my software packages or my web site.
Last updated November 15, 2007
Copyright 1999, 2000, 2007 Eric Smith