tar x [MEMBER...]

Extract files from an archive

Arguments

NameDescription
MEMBER

Options

NameDescription
f, -f, --file <ARCHIVE>
  • Required ✳
--force-localArchive file is local even if it has a colon
F, -F, --info-script, --new-volume-script <COMMAND>Run COMMAND at the end of each tape
L, -L, --tape-length <N>Change tape after writing Nx1024 bytes
M, -M, --multi-volumeCreate/list/extract multi-volume archive
--rmt-command <COMMAND>Use COMMAND instead of rmt when accessing remote archives
--rsh-command <COMMAND>Use COMMAND instead of rsh when accessing remote archives
--volno-file <FILE>Tar will keep track of which volume of a multi-volume archive it is working in FILE
n, -n, --seekAssume the archive is seekable
--no-seekAssume the archive is not seekable
--occurrence [N]Process only the Nth occurrence of each file in the archive
B, -B, --read-full-recordsWhen listing or extracting, accept incomplete input records after end-of-file marker
i, -i, --ignore-zerosIgnore zeroed blocks in archive
V, -V, --label <TEXT>Use TEXT as a globbing pattern for volume name
a, -a, --auto-compressUse archive suffix to determine the compression program
I, -I, --use-compress-program <COMMAND>Filter data through COMMAND
j, -j, --bzip2Filter the archive through bzip2
J, -J, --xzFilter the archive through xz
--lzipFilter the archive through lzip
--lzmaFilter the archive through lzma
--lzopFilter the archive through lzop
--no-auto-compressDo not use archive suffix to determine the compression program
z, -z, --gzip, --gunzip, --ungzipFilter the archive through gzip
Z, -Z, --compress, --uncompressFilter the archive through compress
--zstdFilter the archive through zstd
--transform, --xform <EXPRESSION>Use sed replace EXPRESSION to transform file names
--checkpoint [N]Display progress messages every Nth record
--checkpoint-action <ACTION>Run ACTION on each checkpoint
--full-timePrint file time to its full resolution
--utcPrint file modification times in UTC
K, -K, --starting-file <MEMBER>Begin at the given member in the archive
--show-omitted-dirsList each directory that does not match search criteria
k, -k, --keep-old-filesDon't replace existing files when extracting
--keep-newer-filesDon't replace existing files that are newer than their archive copies
--keep-directory-symlinkDon't replace existing symlinks to directories when extracting
--no-overwrite-dirPreserve metadata of existing directories
--one-top-level <DIR>Extract all files into DIR
--overwriteOverwrite existing files when extracting
--overwrite-dirOverwrite metadata of existing directories when extracting
--recursive-unlinkRecursively remove all files in the directory prior to extracting it
--skip-old-filesDon't replace existing files when extracting, silently skip over them
U, -U, --unlink-firstRemove each file prior to extracting over it
O, -O, --to-stdoutExtract files to standard output
--to-command <COMMAND>Pipe extracted files to COMMAND
--delay-directory-restoreDelay setting modification times and permissions of extracted directories until the end of extraction
m, -m, --touchDon't extract file modified time
--no-delay-directory-restoreCancel the effect of the prior --delay-directory-restore option
--no-same-ownerExtract files as yourself
--no-same-permissionsApply the user's umask when extracting permissions from the archive
p, -p, --preserve-permissions, --same-permissionsExtract information about file permissions
--preserveSame as both -p and -s
--same-ownerTry extracting files with the same ownership as exists in the archive
s, -s, --preserve-order, --same-orderSort names to extract to match archive
--strip-components <NUMBER>Strip NUMBER leading components from file names on extraction
--warning <KEYWORD>
  • Persistent ⚖
  • Repeatable ♾
o, -oSame as --no-same-owner