Such amateurs :)
1) gzip is compatible with UNIX compress, ie. it can decompress
.Z files, so 'gunzip <filename>.tar.Z' works as Stephen says.
2) Creating the intermediate uncompressed file is a waste of disk
space. It is much better to uncompress to a pipe and have 'tar'
extract files from it.
For <filename>.tar.Z:
zcat <filename>.tar.Z | tar xvf -
For <filename>.tar.gz:
gzip -cd <filename>.tar.gz | tar xvf -
As stated above, the 'gzip' command can process .tar.Z files
as well as .tar.gz files.
Many minor variations are possible to the command line are
possible ('uncompress -c' instead of 'zcat', 'gunzip -c' instead
of 'gzip -cd', leave the 'v' option out of tar, etc.) but they
all have the same general effect.
Hope that helps,
DB
PS. Using GNU tar to decompress and extract without explicitly using a
pipe is left as an exercise for the reader :)
-- Dennis Clark President, Programmers' Society dbugger@nospam.ftoomsh.socs.uts.edu.au University of Technology, Sydney "Clear code is a product of clear thought."