To get the files out of a tarball, *.tar :
tar xvf filename.tarIf the tarball has also been gzipped (compressed), *.tar.gz :
tar xvfz filename.tar.gzExtract only certain directories from the tarball, do this:
tar xvzf filenameg.tar.gz */wanted.dir/*For file *.tar.bz2, use the following command :
tar yxf filename.tar.bz2To tar up a file in the current directory into a tarball called filename.tar.gz :
tar cfz filename.tar.gz *.dbTo see a list of the files within a tarball :
tar -tzf filename.tar.gz