Unpacking archives in .tar.gz format

This page contains step by step instructions on how to unpack .tar.gz files. In the following, I assume that you have an archive file called:


and you want to unpack the file to a directory called:


"myarchive.tar.gz" will be a unix tape archive, or .tar file, which has been compressed using "gzip". See the online reading page for more information on compression formats.

Unpacking in windows

The easiest way to unpack archives in windows is to use an archive utility such as EasyZip, (which is freeware) or the shareware program, winzip. Both programs will uncompress .gz, and .Z files, as well as the most common windows compression format, .zip files (compressed with a version of the pkzip algorithm). So, step by step: 1. Save "myarchive.tar.gz" to any directory

  1. Open "myarchive.tar.gz" with the archive utility
  2. If using winzip, accept its suggestion to unpack the .tar file to a tempory folder. If using EasyZip, double click on the .tar file when EasyZip opens to show the files in the .tar file

  3. Click on the extract button, and select "mydirectory" to extract the files to

Unpacking in Unix

Working in unix, you should first uncompress the compressed archive, and then extract the files in the resulting tape archive, or .tar file. Thus: 1. Save the archive to "mydirectory"

  1. Change the current directory to "mydirectory"
  2. Uncompress with the command:

gunzip myarchive.tar.gz

tar xvf myarchive.tar

And that's it.Matthew Brett 18/10/99