Create a tar.gz package

$ tar cvzf targetfile.tar.gz sourcedirectory

Unpack a tar.gz package

$ tar -xvzf package.tgz

Unpack a tar package

$ tar xvf archive.tar