tar

tar

Purpose

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

Syntax

tar [options] files_or_directories

Options

-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 uses the specified file as the archive, instead of a tape.

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

-N only archives files newer than the specified date.

-T archives or extracts the filenames specified in

-v displays verbose messages.

-z compresses or decompresses the archive with

Description

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.