Pack
tar -cvf archive.tar /path/to/folder
Compress
gzip archive.tar bzip2 archive.tar
Pack & Compress
tar -czvf archive.tar.gz /path/to/folder tar -cjvf archive.tar.bz2 /path/to/folder
List files
tar -tvf archive.tar tar -tvf archive.tar.gz tar -tvf archive.tar.bz2
Decompress
gunzip archive.gz bunzip2 archive.bz2
Unpack
tar -xvf archive.tar -C /path/to/folder
Decompress & Unpack
tar -xzvf archive.tar.gz -C /path/to/folder tar -xjvf archive.tar.bz2 -C /path/to/folder
Argument flags
c ... create an archive file x ... extract an archive file f ... specified archive name v ... display the progress z ... filter archive through gzip j ... filter archive through bzip2
Compression details
gzip ... Faster but larger bzip2 ... Smaller but slower