Create an archive of files or extract files from an archive.


tar [options] files_or_directories


-c creates a new archive.

-d compares files in an archive with files in the current directory.

-r extends the archive with more files.

-t lists the contents of an archive.

-x extracts from the archive.

-C directory extracts files into the specified directory.

-f file uses the specified file as the archive, instead of a tape.

-L n specifies the capacity of the tape as n kilobytes.

-N date only archives files newer than the specified date.

-T file archives or extracts the filenames specified in file.

-v displays verbose messages.

-z compresses or decompresses the archive with gzip.


The tar command creates an archive of files, or extracts files from an existing archive. By default, tar assumes the archive to be on a tape. However, you can use the -f option to specify a file as the archive.