You are here
What's a tarball? - or - How do I unpack or create a .tgz or .tar.gz file?
Answer:
Most Unix software on the net is distributed in the form of a tarball. This just means that all the files have been packed into a tar file, which has been compressed with gzip to save space. The file name thus ends up having extension .tar.gz. Sometimes this is shortened to .tgz.
To unpack a tarball:
tar zxvf filename
To list the files in a tarball:
tar ztvf filename
To make a new tarball fred.tar.gz from a directory fred:
tar zcvf fred.tar.gz fred
or
tar cvf fred.tar fred ; gzip fred.tar
If all those cvfs and zxvfs make your head spin, refer to this table, which explains what they all mean:
c | create an archive |
f filename | the name of the archive file |
t | table of contents: tell me what's in an archive |
v | verbose: tell me what's going on |
x | extract from an archive |
z | put the archive through gzip |