Translations:Tar/7/en
Jump to navigation
Jump to search
Common tar options
These are the most common options for tar command. There are two synonymous forms for each, a single-letter form prefixed with a single dash, and a whole-word form prefixed with a double dash:
-c
or--create
: Create a new archive.-f
or--file=
: Following is the archive file name.-x
or--extract
: Extract files from archive.-t
or--list
: List the contents of an archive file.-J
or--xz
: Compress or uncompress withxz
.-z
or--gzip
: Compress or uncompress withgzip
.
Single-letter options can be combined with a single dash, so for example
[name@server ~]$ tar -cJf project1.tar.zx project1
is equivalent to
[name@server ~]$ tar --create --xz --file=project1.tar.xz project1