Create a tar archive
tar -cf archive.tar file1 file2 ... fileN
Create tar archive from a directory
tar -cf archive.tar /path/to/directory/
Create a tar gzipp’d archive
tar -zcf archive.tar.gz file1 file2 ... fileN
Create a tar gzipp’d archive from a directory
tar -zcf archive.tar /path/to/directory/
Create multi-part tar archives from a directory
tar cf - /path/to/directory|split -b<max_size_of_part>M - archive.tar
Extract all files from a tar archive
tar -xf archive.tar
Extract all files from a tar gzipped archive
tar -zxf archive.tar.gz
Extract all files from a tar gzipped archive into a directory
tar -xzf archiv.tar.gz -C /path/to/directory/
Extract a single file from a tar archive
tar -xf archive.tar the_one_file