Also you have 2 sorts of compression technics commonly used with tar balls.
filename.tar.gz OR filename.tgz
filename.tar.bz2
The 2 compression techics are bzip2 and gzip.
They have there own commands:
bzip2 filename #to compress a file
bunzip2 filename #to decompress a file
gzip filename #to compress a file
gunzip filename #to decompress a file
Tar can call up these tools easily by a modifier to uncompress tar archives.
The difference between gzip and bzip2 is there algorithms used to compress the files. Gzip is a older program, bzip2 is newer.
Bzip2 generally compresses files more effeciantly and to smaller sizes then gzip, but uses much more cpu power to decompress. So much so that large files/archives can take a VERY long time to extract compared to a gzip'd file/archive.
Gzip isn't very good at compressing small files, though.
So generally when you want to: 1. save as much disk space as possible 2. save as much bandwidth as possible 3. have bunches of little files to deal with, you want to use bzip2.
If you have very large files or stuff that is dependant on compatability and easy on the cpu resources you want to use gzip. (say your trying to back up a entire 15gig home directory, you'd definately would want to compress it using gzip)
To decompress and extract tar files compressed with bzip2:
tar jxfv filename.tar.bz2
To decompress and extract tar files compressed with gzip:
tar zxfv filename.tgz
Tar is very usefull and is designed specificly for handling directories. See the man file for details, that way you don't have to memorize all the zxfv xfv bxf crap.