--xattrs-exclude=’^user.’, to exclude attributes from the user namespace.
--xattrs-include=PATTERN
Specify the include pattern for xattr keys. PATTERN is a POSIX regular expression.
Device selection and switching
-f, --file=ARCHIVE
Use archive file or device ARCHIVE. If this option is not given, tar will first examine the environment variable ‘TAPE’. If it is set, its value will be used as the archive name. Otherwise, tar will assume
the compiled‐in default. The default value can be inspected either using the --show-defaults option, or at the end of the tar --help output.
An archive name that has a colon in it specifies a file or device on a remote machine. The part before the colon is taken as the machine name or IP address, and the part after it as the file or device path‐
name, e.g.:
‐‐file=remotehost:/dev/sr0
An optional username can be prefixed to the hostname, placing a @ sign between them.
By default, the remote host is accessed via the rsh(1) command. Nowadays it is common to use ssh(1) instead. You can do so by giving the following command line option:
‐‐rsh‐command=/usr/bin/ssh
The remote machine should have the rmt(8) command installed. If its pathname does not match tar’s default, you can inform tar about the correct pathname using the --rmt-command option.
--force-local
Archive file is local even if it has a colon.
-F, --info-script=COMMAND, --new-volume-script=COMMAND
Run COMMAND at the end of each tape (implies -M). The command can include arguments. When started, it will inherit tar’s environment plus the following variables:
TAR_VERSION
GNU tar version number.
TAR_ARCHIVE
The name of the archive tar is processing.
TAR_BLOCKING_FACTOR
Current blocking factor, i.e. number of 512‐byte blocks in a record.
TAR_VOLUME
Ordinal number of the volume tar is processing (set if reading a multi‐volume archive).
TAR_FORMAT
Format of the archive being processed. One of: gnu, oldgnu, posix, ustar, v7.
TAR_SUBCOMMAND
A short option (with a leading dash) describing the operation tar is executing.
TAR_FD File descriptor which can be used to communicate the new volume name to tar.
If the info script fails, tar exits; otherwise, it begins writing the next volume.
-L, --tape-length=N
Change tape after writing Nx1024 bytes. If N is followed by a size suffix (see the subsection Size suffixes below), the suffix specifies the multiplicative factor to be used instead of 1024.
This option implies -M.
-M, --multi-volume
Create/list/extract multi‐volume archive.
--rmt-command=COMMAND
Use COMMAND instead of rmt when accessing remote archives. See the description of the -f option, above.
--rsh-command=COMMAND
Use COMMAND instead of rsh when accessing remote archives. See the description of the -f option, above.
--volno-file=FILE
When this option is used in conjunction with --multi-volume, tar will keep track of which volume of a multi‐volume archive it is working in FILE.
Device blocking
-b, --blocking-factor=BLOCKS
Set record size to BLOCKSx512 bytes.
-B, --read-full-records
When listing or extracting, accept incomplete input records after end‐of‐file marker.
-i, --ignore-zeros
Ignore zeroed blocks in archive. Normally two consecutive 512‐blocks filled with zeroes mean EOF and tar stops reading after encountering them. This option instructs it to read further and is useful when