Introduction to TGZ files

The programs

TGZ  files are tars (TapeARchives) compressed with the gzip compressing utility. I like to use this archiving format instead of e.g. PKZIP or ARJ because tar and gzip are free software developed by the  GNU project and covered by the  General Public License (GPL) .
The programs are available for several operating systems and machines, especially several UNIces and DOS.
You can download them from the  GNU FTP server  or get the DOS versions of  tar.exe  and  gzip.exe  from this site.

How to unpack a .tgz

I assume you have a file named archive.tgz you now want to unpack. This can be done in two very simple steps:

first you must decompress the .tar file out of the .tgz this is done by typing:
> gzip -d archive.tgz
The -d swich means that you want to decompress the file instead of compressing it. If you read your directory now (with "ls  -l"on UNIX or "dir" on DOS) you will find a file named archive.tar instead of the archive.tgz file. Note that archive.tar has a greater size than the former  archive.tgz now that it is decompressed.  To get a list of contents from a tar archive you can type tar -tf archive.tar.

Second you must extract  the contents from the .tar archive. Simply type
> tar -xvf archive.tar
The switches mean -x for eXtract,  -v  for Verbose and -f for file. The -f switch is there for historical reasons.
The extracted contents are now in your current working directory. It may be either a new subdirectory or a bunch
of new files. It is always a good idea to view the list of contents with tar -tf archive.tar before extracting so you know
what is going to happen. The archive.tar file will not get deleted by tar -xvf

You can also use the program untgz.exe. Just type untgz archive.tgz and it works ;-)

How to create a .tgz

Let's asume you have a directory mystuff full of stuff  you want to archivate.  Change into this directory
> cd mystuff
Now create the .tar file
>tar -cvf archive.tar *
Note that * means what usually is meant by *.* on DOS systems. Now you compress the .tar file to a .tgz by typing:
>gzip archive.tar -S tgz
The -S tgz switch forces the suffix tgz to be used.