Q1: What is the deal with this ".tar.gz" thing. Why is everything Linux packed down with two different tools? I have been using PKZIP and later WinZIP on the PC side for years, as well as others (LZH, etc), and every one will handle the directory structure as well as the compression.


Linux and the GNU toolchain follow the UNIX philosohpy that a toolbox containing many simple tools that each do one thing well is better than one tool that does everything but no so well.

In this case, the 2 tools are gzip which is the compression tool, and tar which is an archive tool. (tar is shorthand for Tape ARchive).

This combined with the power of various shells allows very powerful things to be done, e.g.

(cd /mnt1 && tar cpXz .) | ( cd /mnt2 && tar xpzf -)

which will copy the contents of one mounted drive /mnt1 to a second mounted drive /mnt2, preserving file structure, ownership and permissions along the way. Very useful during a drive change

You will find this philosophy all over UNIX and linux. Ironically, tar does understand compression. The 'z' switch to tar will tell it to zip/unzip the file as appropiate. So tar cpfz mydirectory > mydirectory.tgz actually creates a zipped archive of the directory. (.tgz files are the same as .tar.gz files to all intents and purposes)

Try typing 'man tar' and 'man gzip' in a shell.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.