tar/last_help2man_run

611 lines
13 KiB
Plaintext
Raw Normal View History

.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH TAR "1" "November 2013" "tar 1.27.1" "User Commands"
.SH NAME
tar \- manual page for tar 1.27.1
.SH SYNOPSIS
.B tar
[\fIOPTION\fR...] [\fIFILE\fR]...
.SH DESCRIPTION
GNU 'tar' saves many files together into a single tape or disk archive, and can
restore individual files from the archive.
.SH EXAMPLES
.TP
tar \-cf archive.tar foo bar
# Create archive.tar from files foo and bar.
.TP
tar \-tvf archive.tar
# List all files in archive.tar verbosely.
.TP
tar \-xf archive.tar
# Extract all files from archive.tar.
.IP
Main operation mode:
.TP
\-A, \-\-catenate, \-\-concatenate
append tar files to an archive
.TP
\-c, \-\-create
create a new archive
.TP
\-d, \-\-diff, \-\-compare
find differences between archive and file system
.TP
\-\-delete
delete from the archive (not on mag tapes!)
.TP
\-r, \-\-append
append files to the end of an archive
.TP
\-t, \-\-list
list the contents of an archive
.TP
\-\-test\-label
test the archive volume label and exit
.TP
\-u, \-\-update
only append files newer than copy in archive
.TP
\-x, \-\-extract, \-\-get
extract files from an archive
.IP
Operation modifiers:
.TP
\-\-check\-device
check device numbers when creating incremental
archives (default)
.TP
\-g, \-\-listed\-incremental=FILE
handle new GNU\-format incremental backup
.TP
\-G, \-\-incremental
handle old GNU\-format incremental backup
.TP
\-\-ignore\-failed\-read
do not exit with nonzero on unreadable files
.TP
\-\-level=NUMBER
dump level for created listed\-incremental archive
.TP
\-n, \-\-seek
archive is seekable
.TP
\-\-no\-check\-device
do not check device numbers when creating
incremental archives
.TP
\-\-no\-seek
archive is not seekable
.TP
\-\-occurrence[=NUMBER]
process only the NUMBERth occurrence of each file
in the archive; this option is valid only in
conjunction with one of the subcommands \-\-delete,
\-\-diff, \-\-extract or \-\-list and when a list of
files is given either on the command line or via
the \-T option; NUMBER defaults to 1
.TP
\-\-sparse\-version=MAJOR[.MINOR]
set version of the sparse format to use (implies
\-\-sparse)
.TP
\-S, \-\-sparse
handle sparse files efficiently
.IP
Overwrite control:
.TP
\-k, \-\-keep\-old\-files
don't replace existing files when extracting,
treat them as errors
.TP
\-\-keep\-directory\-symlink
preserve existing symlinks to directories when
extracting
.TP
\-\-keep\-newer\-files
don't replace existing files that are newer than
their archive copies
.TP
\-\-no\-overwrite\-dir
preserve metadata of existing directories
.TP
\-\-overwrite
overwrite existing files when extracting
.TP
\-\-overwrite\-dir
overwrite metadata of existing directories when
extracting (default)
.TP
\-\-recursive\-unlink
empty hierarchies prior to extracting directory
.TP
\-\-remove\-files
remove files after adding them to the archive
.TP
\-\-skip\-old\-files
don't replace existing files when extracting,
silently skip over them
.TP
\-U, \-\-unlink\-first
remove each file prior to extracting over it
.TP
\-W, \-\-verify
attempt to verify the archive after writing it
.IP
Select output stream:
.HP
\-\-ignore\-command\-error ignore exit codes of children
.TP
\-\-no\-ignore\-command\-error
treat non\-zero exit codes of children as
error
.TP
\-O, \-\-to\-stdout
extract files to standard output
.TP
\-\-to\-command=COMMAND
pipe extracted files to another program
.IP
Handling of file attributes:
.TP
\-\-atime\-preserve[=METHOD]
preserve access times on dumped files, either
by restoring the times after reading
(METHOD='replace'; default) or by not setting the
times in the first place (METHOD='system')
.TP
\-\-delay\-directory\-restore
delay setting modification times and
permissions of extracted directories until the end
of extraction
.TP
\-\-group=NAME
force NAME as group for added files
.TP
\-\-mode=CHANGES
force (symbolic) mode CHANGES for added files
.TP
\-\-mtime=DATE\-OR\-FILE
set mtime for added files from DATE\-OR\-FILE
.TP
\-m, \-\-touch
don't extract file modified time
.TP
\-\-no\-delay\-directory\-restore
cancel the effect of \-\-delay\-directory\-restore
option
.TP
\-\-no\-same\-owner
extract files as yourself (default for ordinary
users)
.TP
\-\-no\-same\-permissions
apply the user's umask when extracting permissions
from the archive (default for ordinary users)
.TP
\-\-numeric\-owner
always use numbers for user/group names
.TP
\-\-owner=NAME
force NAME as owner for added files
.TP
\-p, \-\-preserve\-permissions, \-\-same\-permissions
extract information about file permissions
(default for superuser)
.TP
\-\-preserve
same as both \-p and \-s
.TP
\-\-same\-owner
try extracting files with the same ownership as
exists in the archive (default for superuser)
.TP
\-s, \-\-preserve\-order, \-\-same\-order
member arguments are listed in the same order as
the files in the archive
.IP
Handling of extended file attributes:
.TP
\-\-acls
Enable the POSIX ACLs support
.TP
\-\-no\-acls
Disable the POSIX ACLs support
.TP
\-\-no\-selinux
Disable the SELinux context support
.TP
\-\-no\-xattrs
Disable extended attributes support
.TP
\-\-selinux
Enable the SELinux context support
.TP
\-\-xattrs
Enable extended attributes support
.TP
\-\-xattrs\-exclude=MASK
specify the exclude pattern for xattr keys
.TP
\-\-xattrs\-include=MASK
specify the include pattern for xattr keys
.IP
Device selection and switching:
.TP
\-f, \-\-file=ARCHIVE
use archive file or device ARCHIVE
.TP
\-\-force\-local
archive file is local even if it has a colon
.TP
\-F, \-\-info\-script=NAME, \-\-new\-volume\-script=NAME
run script at end of each tape (implies \-M)
.TP
\-L, \-\-tape\-length=NUMBER
change tape after writing NUMBER x 1024 bytes
.TP
\-M, \-\-multi\-volume
create/list/extract multi\-volume archive
.TP
\-\-rmt\-command=COMMAND
use given rmt COMMAND instead of rmt
.TP
\-\-rsh\-command=COMMAND
use remote COMMAND instead of rsh
.TP
\-\-volno\-file=FILE
use/update the volume number in FILE
.IP
Device blocking:
.TP
\-b, \-\-blocking\-factor=BLOCKS
BLOCKS x 512 bytes per record
.TP
\-B, \-\-read\-full\-records
reblock as we read (for 4.2BSD pipes)
.TP
\-i, \-\-ignore\-zeros
ignore zeroed blocks in archive (means EOF)
.TP
\-\-record\-size=NUMBER
NUMBER of bytes per record, multiple of 512
.IP
Archive format selection:
.TP
\-H, \-\-format=FORMAT
create archive of the given format
.IP
FORMAT is one of the following:
.TP
gnu
GNU tar 1.13.x format
.TP
oldgnu
GNU format as per tar <= 1.12
.TP
pax
POSIX 1003.1\-2001 (pax) format
.TP
posix
same as pax
.TP
ustar
POSIX 1003.1\-1988 (ustar) format
.TP
v7
old V7 tar format
.TP
\-\-old\-archive, \-\-portability
same as \-\-format=v7
.TP
\-\-pax\-option=keyword[[:]=value][,keyword[[:]=value]]...
control pax keywords
.TP
\-\-posix
same as \-\-format=posix
.TP
\-V, \-\-label=TEXT
create archive with volume name TEXT; at
list/extract time, use TEXT as a globbing pattern
for volume name
.IP
Compression options:
.TP
\-a, \-\-auto\-compress
use archive suffix to determine the compression
program
.TP
\-I, \-\-use\-compress\-program=PROG
filter through PROG (must accept \-d)
.TP
\-j, \-\-bzip2
filter the archive through bzip2
.TP
\-J, \-\-xz
filter the archive through xz
.TP
\-\-lzip
filter the archive through lzip
.TP
\-\-lzma
filter the archive through xz \-\-format=lzma
.HP
\-\-lzop
.TP
\-\-no\-auto\-compress
do not use archive suffix to determine the
compression program
.TP
\-z, \-\-gzip, \-\-gunzip, \-\-ungzip
filter the archive through gzip
.TP
\-Z, \-\-compress, \-\-uncompress
filter the archive through compress
.IP
Local file selection:
.TP
\-\-add\-file=FILE
add given FILE to the archive (useful if its name
starts with a dash)
.TP
\-\-backup[=CONTROL]
backup before removal, choose version CONTROL
.TP
\-C, \-\-directory=DIR
change to directory DIR
.TP
\-\-exclude=PATTERN
exclude files, given as a PATTERN
.TP
\-\-exclude\-backups
exclude backup and lock files
.TP
\-\-exclude\-caches
exclude contents of directories containing
CACHEDIR.TAG, except for the tag file itself
.TP
\-\-exclude\-caches\-all
exclude directories containing CACHEDIR.TAG
.TP
\-\-exclude\-caches\-under exclude everything under directories containing
CACHEDIR.TAG
.TP
\-\-exclude\-tag=FILE
exclude contents of directories containing FILE,
except for FILE itself
.HP
\-\-exclude\-tag\-all=FILE exclude directories containing FILE
.TP
\-\-exclude\-tag\-under=FILE
exclude everything under directories
containing FILE
.TP
\-\-exclude\-vcs
exclude version control system directories
.TP
\-h, \-\-dereference
follow symlinks; archive and dump the files they
point to
.TP
\-\-hard\-dereference
follow hard links; archive and dump the files they
refer to
.TP
\-K, \-\-starting\-file=MEMBER\-NAME
begin at member MEMBER\-NAME when reading the
archive
.TP
\-\-newer\-mtime=DATE
compare date and time when data changed only
.TP
\-\-no\-null
disable the effect of the previous \-\-null option
.TP
\-\-no\-recursion
avoid descending automatically in directories
.TP
\-\-no\-unquote
do not unquote filenames read with \-T
.HP
\-\-null \-T reads null\-terminated names, disable \-C
.TP
\-N, \-\-newer=DATE\-OR\-FILE, \-\-after\-date=DATE\-OR\-FILE
only store files newer than DATE\-OR\-FILE
.TP
\-\-one\-file\-system
stay in local file system when creating archive
.TP
\-P, \-\-absolute\-names
don't strip leading '/'s from file names
.TP
\-\-recursion
recurse into directories (default)
.TP
\-\-suffix=STRING
backup before removal, override usual suffix ('~'
unless overridden by environment variable
SIMPLE_BACKUP_SUFFIX)
.TP
\-T, \-\-files\-from=FILE
get names to extract or create from FILE
.TP
\-\-unquote
unquote filenames read with \-T (default)
.TP
\-X, \-\-exclude\-from=FILE
exclude patterns listed in FILE
.IP
File name transformations:
.TP
\-\-strip\-components=NUMBER
strip NUMBER leading components from file
names on extraction
.TP
\-\-transform=EXPRESSION, \-\-xform=EXPRESSION
use sed replace EXPRESSION to transform file
names
.IP
File name matching options (affect both exclude and include patterns):
.TP
\-\-anchored
patterns match file name start
.TP
\-\-ignore\-case
ignore case
.TP
\-\-no\-anchored
patterns match after any '/' (default for
exclusion)
.TP
\-\-no\-ignore\-case
case sensitive matching (default)
.TP
\-\-no\-wildcards
verbatim string matching
.TP
\-\-no\-wildcards\-match\-slash
wildcards do not match '/'
.TP
\-\-wildcards
use wildcards (default)
.TP
\-\-wildcards\-match\-slash
wildcards match '/' (default for exclusion)
.IP
Informative output:
.TP
\-\-checkpoint[=NUMBER]
display progress messages every NUMBERth record
(default 10)
.TP
\-\-checkpoint\-action=ACTION
execute ACTION on each checkpoint
.TP
\-\-full\-time
print file time to its full resolution
.TP
\-\-index\-file=FILE
send verbose output to FILE
.TP
\-l, \-\-check\-links
print a message if not all links are dumped
.TP
\-\-no\-quote\-chars=STRING
disable quoting for characters from STRING
.TP
\-\-quote\-chars=STRING
additionally quote characters from STRING
.TP
\-\-quoting\-style=STYLE
set name quoting style; see below for valid STYLE
values
.TP
\-R, \-\-block\-number
show block number within archive with each message
.TP
\-\-show\-defaults
show tar defaults
.TP
\-\-show\-omitted\-dirs
when listing or extracting, list each directory
that does not match search criteria
.TP
\-\-show\-snapshot\-field\-ranges
show valid ranges for snapshot\-file fields
.TP
\-\-show\-transformed\-names, \-\-show\-stored\-names
show file or archive names after transformation
.TP
\-\-totals[=SIGNAL]
print total bytes after processing the archive;
with an argument \- print total bytes when this
SIGNAL is delivered; Allowed signals are: SIGHUP,
SIGQUIT, SIGINT, SIGUSR1 and SIGUSR2; the names
without SIG prefix are also accepted
.TP
\-\-utc
print file modification times in UTC
.TP
\-v, \-\-verbose
verbosely list files processed
.TP
\-\-warning=KEYWORD
warning control
.TP
\-w, \-\-interactive, \-\-confirmation
ask for confirmation for every action
.IP
Compatibility options:
.TP
\-o
when creating, same as \-\-old\-archive; when
extracting, same as \-\-no\-same\-owner
.IP
Other options:
.TP
\-?, \-\-help
give this help list
.TP
\-\-restrict
disable use of some potentially harmful options
.TP
\-\-usage
give a short usage message
.TP
\-\-version
print program version
.PP
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
.PP
The backup suffix is '~', unless set with \-\-suffix or SIMPLE_BACKUP_SUFFIX.
The version control may be set with \-\-backup or VERSION_CONTROL, values are:
.TP
none, off
never make backups
.TP
t, numbered
make numbered backups
.TP
nil, existing
numbered if numbered backups exist, simple otherwise
.TP
never, simple
always make simple backups
.PP
Valid arguments for the \-\-quoting\-style option are:
.IP
literal
shell
shell\-always
c
c\-maybe
escape
locale
clocale
.PP
*This* tar defaults to:
\-\-format=gnu \-f\- \-b20 \-\-quoting\-style=escape \-\-rmt\-command=/etc/rmt
\-\-rsh\-command=/usr/bin/ssh
.SH AUTHOR
Written by John Gilmore and Jay Fenlason.
.SH "REPORTING BUGS"
Report bugs to <bug\-tar@gnu.org>.
.SH COPYRIGHT
Copyright \(co 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
The full documentation for
.B tar
is maintained as a Texinfo manual. If the
.B info
and
.B tar
programs are properly installed at your site, the command
.IP
.B info tar
.PP
should give you access to the complete manual.