Home

untar

Untar is the process of extracting files from a tar archive. Tar, short for tape archive, is a container format used to bundle multiple files into a single archive, originally to simplify storage on magnetic tapes. Tar archives can be uncompressed or compressed with gzip, bzip2, or xz.

In Unix-like systems, the tar command performs extraction. The basic syntax is tar -xvf archive.tar, where -x

On Windows or other platforms, untar can be done with utilities such as 7-Zip, WinRAR, or via

Security considerations include avoiding extraction of archives from untrusted sources, as archives may contain files with

extracts,
-v
lists
files,
and
-f
specifies
the
archive
file.
For
compressed
archives,
common
variants
are
tar
-xzvf
archive.tar.gz
(gzip),
tar
-xjvf
archive.tar.bz2
(bzip2),
and
tar
-xJvf
archive.tar.xz
(xz).
A
destination
directory
can
be
chosen
with
-C.
Windows
Subsystem
for
Linux,
which
provides
a
tar
implementation.
Some
tools
allow
extracting
without
verbose
output
or
with
more
advanced
options.
absolute
paths
or
dangerous
symlinks.
Use
--strip-components
to
remove
leading
directories
and
extract
into
a
dedicated
directory,
and
verify
checksums
when
provided.