SBN What to do with a TGZ File

By a TGZ file we mean a TAR file that was been compressed by GZIP. TGZ or the equivalent TAR.GZ files are often called tarballs. For the gory details about gzip-compressed tar files, you can consult www.gzip.org or this Wikipedia article about gzip files.

Depending on the operating system you are using, there are several tools for uncompressing and untarring these files. At this point it is easier to list what we know works than everything that doesn't:

Mac OS X
On contemporary Macs, we have successfully used the Mac Archive Utility to unpack TGZ files. We have also used the Stuffit application, usually included on a Mac, to extract TGZ files.
Linux
On contemporary Linux machines, we have used a combination of the gunzip and tar commands to unpack TGZ files. These commands should be included in your Linux command library. Gunzip and tar will run in the background or as a batch job. The typical commands looks like this:

Windows
On a Windows machine, do not use WinZip to extract TGZ (or TAR) files containing FITS files. Several researchers have found that WinZip corrupts FITS. We have successfully uncompressed and extracted TGZ file using a combination of two freeware tools: the WinGZ GUI application and the GNU Win32 BsdTar executable (from a DOS command line prompt).

The WinGz utility can be downloaded from www.irnis.net. Follow the installation directions provided by this web site.

The GNU Win32 project developed and maintains the BsdTar executable. The GNU Win32 file archive library which includes BsdTar is available at gnuwin32.sourceforge.net. Again, follow the installation directions provided by this web site.

Now the trick to unpack TGZ files on Windows is to first launch WinGZ to uncompress the TGZ file. The result will be a new uncompressed file with the same name as the tarball but with an extension of TAR. Next, launch a DOS window and change the directory to the location of the new TAR file. At the command line, extract the contents this TAR file by typing:

You will see the extracted contents of the TAR file (including the TAR file) in the current working directory.


Last update: 10 January 2008, S.McLaughlin