Tar

Initially, tar archives were used to store files conveniently on magnetic tape. The name "Tar" comes from this use; it stands for tape archiver. Despite the utility's name, Tar can direct its output to available devices, files, or other programs (using pipes), it can even access remote devices or files (as archives).

The standard

Operations

-c, --create

Create a new archive with dir to be archived recursively

-x, --extract, --get

Extract files from an archive. You can specify which file/dir you want to extract by giving its name.

-t, --list

List the contents of an archive.

Options

-f, --file

Specify the archive being used.

-v, --verbose

Show the files being worked on as tar is running.

Compression

-a, --auto-compress

will auto-detect

|Long|Short|Archive format|

|---|---|---|

|‘--gzip’|‘-z’|gzip|

|‘--bzip2’|‘-j’|bzip2|

|‘--xz’|‘-J’|xz|

|‘--lzip’||lzip|

|‘--lzma’||lzma|

|‘--lzop’||lzop|

|‘--zstd’||zstd|

|‘--compress’|‘-Z’|compress|

The Fancy

Operations

-A, --catenate, --concatenate

Append archives to the end of another archive.

-d, --diff, --compare

Find differences between archive and file system.

--delete

Delete from the archive.

-r, --append

Append files to the end of an archive.

-u, --update

Append files which are newer than the corresponding copy in the archive. Updated files will be tacked to the end of the archive instead of replaced.

Options

-vv, the double verbose

Show extra detail about the files being extracted.

Sources

https://www.gnu.org/software/tar/manual/tar.html