The following options decide which mode the command tar will use:
-c
|Create a new archive containing the specified files/directories.
-r
|Like -c, but new files/directories are added to the archive.
|Note that this only works on uncompressed archives stored in regular files.
|The -f option is required.
-u
|Like -r, but new files/directories are added only if they have a modification date newer than the corresponding file/directory in the archive.
|Note that this only works on uncompressed archives stored in regular files.
|The -f option is required.
-t
|List archive contents to standard output.
-x
|Extract to disk from the archive.
|If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies.
The following additional options can be used:
-f file
|Read/write the archive from/to the specified file.
|The filename can be - for standard input or standard output.
-C directory
|Change the output to the specified directory.
-z
|Redirect the output to the gzip command for compression.
-j
|Redirect the output to the bgzip2 command for compression.
-m
|(x mode only)
|Do not extract modification time.
|By default, the modification time is set to the time stored in the archive.
-w
|Ask for confirmation for every action.
-v
|Produce verbose output.
|In create and extract modes, tar will list each file name as it is read from or written to the archive.
|In list mode, tar will produce output similar to that of ls.