<s>
In	O
computing	O
,	O
tar	B-Application
is	O
a	O
computer	O
software	O
utility	O
for	O
collecting	O
many	O
files	O
into	O
one	O
archive	B-Application
file	I-Application
,	O
often	O
referred	O
to	O
as	O
a	O
tarball	B-Application
,	O
for	O
distribution	B-Application
or	O
backup	O
purposes	O
.	O
</s>
<s>
The	O
name	O
is	O
derived	O
from	O
"	O
tape	B-Application
archive	I-Application
"	O
,	O
as	O
it	O
was	O
originally	O
developed	O
to	O
write	O
data	O
to	O
sequential	O
I/O	B-General_Concept
devices	I-General_Concept
with	O
no	O
file	B-Application
system	I-Application
of	O
their	O
own	O
.	O
</s>
<s>
The	O
archive	B-Application
data	O
sets	O
created	O
by	O
tar	B-Application
contain	O
various	O
file	B-Application
system	I-Application
parameters	O
,	O
such	O
as	O
name	O
,	O
timestamps	O
,	O
ownership	O
,	O
file-access	O
permissions	O
,	O
and	O
directory	B-Application
organization	O
.	O
</s>
<s>
POSIX	O
abandoned	O
tar	B-Application
in	O
favor	O
of	O
pax	B-Device
,	O
yet	O
tar	B-Application
sees	O
continued	O
widespread	O
use	O
.	O
</s>
<s>
The	O
command-line	B-Application
utility	O
was	O
first	O
introduced	O
in	O
the	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
in	O
January	O
1979	O
,	O
replacing	O
the	O
tp	O
program	O
(	O
which	O
in	O
turn	O
replaced	O
"	O
tap	O
"	O
)	O
.	O
</s>
<s>
The	O
tar	B-Application
command	I-Application
was	O
abandoned	O
in	O
POSIX.1-2001	O
in	O
favor	O
of	O
pax	B-Device
command	B-Application
,	O
which	O
was	O
to	O
support	O
ustar	O
file	O
format	O
;	O
the	O
tar	B-Application
command	I-Application
was	O
indicated	O
for	O
withdrawal	O
in	O
favor	O
of	O
pax	B-Device
command	B-Application
at	O
least	O
since	O
1994	O
.	O
</s>
<s>
Today	O
,	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
usually	O
include	O
tools	O
to	O
support	O
tar	B-Application
files	I-Application
,	O
as	O
well	O
as	O
utilities	O
commonly	O
used	O
to	O
compress	B-Device
them	O
,	O
such	O
as	O
gzip	B-Application
and	O
bzip2	B-Application
.	O
</s>
<s>
The	O
command	B-Application
has	O
also	O
been	O
ported	O
to	O
the	O
IBM	B-Application
i	I-Application
operating	O
system	O
.	O
</s>
<s>
BSD-tar	O
has	O
been	O
included	O
in	O
Microsoft	B-Application
Windows	I-Application
since	O
Windows	O
10	O
April	O
2018	O
Update	O
,	O
and	O
there	O
are	O
otherwise	O
multiple	O
third	O
party	O
tools	O
available	O
to	O
read	O
and	O
write	O
these	O
formats	O
on	O
Windows	O
.	O
</s>
<s>
Many	O
historic	O
tape	O
drives	O
read	O
and	O
write	O
variable-length	O
data	B-General_Concept
blocks	I-General_Concept
,	O
leaving	O
significant	O
wasted	O
space	O
on	O
the	O
tape	O
between	O
blocks	O
(	O
for	O
the	O
tape	O
to	O
physically	O
start	O
and	O
stop	O
moving	O
)	O
.	O
</s>
<s>
Some	O
tape	O
drives	O
(	O
and	O
raw	O
disks	O
)	O
support	O
only	O
fixed-length	O
data	B-General_Concept
blocks	I-General_Concept
.	O
</s>
<s>
Also	O
,	O
when	O
writing	O
to	O
any	O
medium	O
such	O
as	O
a	O
file	B-Application
system	I-Application
or	O
network	O
,	O
it	O
takes	O
less	O
time	O
to	O
write	O
one	O
large	O
block	O
than	O
many	O
small	O
blocks	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
tar	B-Application
command	I-Application
writes	O
data	O
in	O
records	O
of	O
many	O
512B	O
blocks	O
.	O
</s>
<s>
There	O
are	O
multiple	O
tar	B-Application
file	I-Application
formats	I-Application
,	O
including	O
historical	O
and	O
current	O
ones	O
.	O
</s>
<s>
Two	O
tar	B-Application
formats	O
are	O
codified	O
in	O
POSIX	O
:	O
ustar	O
and	O
pax	B-Device
.	O
</s>
<s>
Not	O
codified	O
but	O
still	O
in	O
current	O
use	O
is	O
the	O
GNU	B-Application
tar	I-Application
format	O
.	O
</s>
<s>
A	O
tar	B-Application
archive	I-Application
consists	O
of	O
a	O
series	O
of	O
file	O
objects	O
,	O
hence	O
the	O
popular	O
term	O
tarball	B-Application
,	O
referencing	O
how	O
a	O
tarball	B-Application
collects	O
objects	O
of	O
all	O
kinds	O
that	O
stick	O
to	O
its	O
surface	O
.	O
</s>
<s>
Each	O
file	O
object	O
includes	O
any	O
file	O
data	O
,	O
and	O
is	O
preceded	O
by	O
a	O
512-byte	O
header	B-General_Concept
record	O
.	O
</s>
<s>
The	O
file	O
data	O
is	O
written	O
unaltered	O
except	O
that	O
its	O
length	O
is	O
rounded	O
up	O
to	O
a	O
multiple	O
of	O
512	O
bytes	B-Application
.	O
</s>
<s>
The	O
original	O
tar	B-Application
implementation	O
did	O
not	O
care	O
about	O
the	O
contents	O
of	O
the	O
padding	O
bytes	B-Application
,	O
and	O
left	O
the	O
buffer	O
data	O
unaltered	O
,	O
but	O
most	O
modern	O
tar	B-Application
implementations	O
fill	O
the	O
extra	O
space	O
with	O
zeros	O
.	O
</s>
<s>
The	O
end	O
of	O
an	O
archive	B-Application
is	O
marked	O
by	O
at	O
least	O
two	O
consecutive	O
zero-filled	O
records	O
.	O
</s>
<s>
(	O
The	O
origin	O
of	O
tar	B-Application
's	O
record	O
size	O
appears	O
to	O
be	O
the	O
512-byte	O
disk	O
sectors	O
used	O
in	O
the	O
Version	B-Operating_System
7	I-Operating_System
Unix	I-Operating_System
file	B-Application
system	I-Application
.	O
)	O
</s>
<s>
The	O
final	O
block	O
of	O
an	O
archive	B-Application
is	O
padded	O
out	O
to	O
full	O
length	O
with	O
zeros	O
.	O
</s>
<s>
The	O
file	B-General_Concept
header	I-General_Concept
record	O
contains	O
metadata	O
about	O
a	O
file	O
.	O
</s>
<s>
To	O
ensure	O
portability	O
across	O
different	O
architectures	O
with	O
different	O
byte	B-Application
orderings	O
,	O
the	O
information	O
in	O
the	O
header	B-General_Concept
record	O
is	O
encoded	O
in	O
ASCII	B-Protocol
.	O
</s>
<s>
Thus	O
if	O
all	O
the	O
files	O
in	O
an	O
archive	B-Application
are	O
ASCII	B-Protocol
text	I-Protocol
files	I-Protocol
,	O
and	O
have	O
ASCII	B-Protocol
names	O
,	O
then	O
the	O
archive	B-Application
is	O
essentially	O
an	O
ASCII	B-Protocol
text	I-Protocol
file	I-Protocol
(	O
containing	O
many	O
NUL	O
characters	O
)	O
.	O
</s>
<s>
The	O
fields	O
defined	O
by	O
the	O
original	O
Unix	B-Application
tar	B-Application
format	O
are	O
listed	O
in	O
the	O
table	O
below	O
.	O
</s>
<s>
When	O
a	O
field	O
is	O
unused	O
it	O
is	O
filled	O
with	O
NUL	O
bytes	B-Application
.	O
</s>
<s>
The	O
header	B-General_Concept
uses	O
257	O
bytes	B-Application
,	O
then	O
is	O
padded	O
with	O
NUL	O
bytes	B-Application
to	O
make	O
it	O
fill	O
a	O
512	O
byte	B-Application
record	O
.	O
</s>
<s>
There	O
is	O
no	O
"	O
magic	O
number	O
"	O
in	O
the	O
header	B-General_Concept
,	O
for	O
file	O
identification	O
.	O
</s>
<s>
v7	O
)	O
tar	B-Application
header	B-General_Concept
:	O
</s>
<s>
Some	O
pre-POSIX.1-1988	O
tar	B-Application
implementations	O
indicated	O
a	O
directory	B-Application
by	O
having	O
a	O
trailing	O
slash	O
(	O
/	O
)	O
in	O
the	O
name	O
.	O
</s>
<s>
Numeric	O
values	O
are	O
encoded	O
in	O
octal	O
numbers	O
using	O
ASCII	B-Protocol
digits	O
,	O
with	O
leading	O
zeroes	O
.	O
</s>
<s>
Thus	O
although	O
there	O
are	O
12	O
bytes	B-Application
reserved	O
for	O
storing	O
the	O
file	O
size	O
,	O
only	O
11	O
octal	O
digits	O
can	O
be	O
stored	O
.	O
</s>
<s>
To	O
overcome	O
this	O
limitation	O
,	O
in	O
2001	O
star	O
introduced	O
a	O
base-256	O
coding	O
that	O
is	O
indicated	O
by	O
setting	O
the	O
high-order	O
bit	O
of	O
the	O
leftmost	O
byte	B-Application
of	O
a	O
numeric	O
field	O
.	O
</s>
<s>
GNU-tar	O
and	O
BSD-tar	O
followed	O
this	O
idea	O
.	O
</s>
<s>
Additionally	O
,	O
versions	O
of	O
tar	B-Application
from	O
before	O
the	O
first	O
POSIX	O
standard	O
from	O
1988	O
pad	O
the	O
values	O
with	O
spaces	O
instead	O
of	O
zeroes	O
.	O
</s>
<s>
The	O
checksum	B-Algorithm
is	O
calculated	O
by	O
taking	O
the	O
sum	O
of	O
the	O
unsigned	O
byte	B-Application
values	O
of	O
the	O
header	B-General_Concept
record	O
with	O
the	O
eight	O
checksum	B-Algorithm
bytes	B-Application
taken	O
to	O
be	O
ASCII	B-Protocol
spaces	O
(	O
decimal	O
value	O
32	O
)	O
.	O
</s>
<s>
In	O
addition	O
,	O
some	O
historic	O
tar	B-Application
implementations	O
treated	O
bytes	B-Application
as	O
signed	O
.	O
</s>
<s>
Implementations	O
typically	O
calculate	O
the	O
checksum	B-Algorithm
both	O
ways	O
,	O
and	O
treat	O
it	O
as	O
good	O
if	O
either	O
the	O
signed	O
or	O
unsigned	O
sum	O
matches	O
the	O
included	O
checksum	B-Algorithm
.	O
</s>
<s>
Unix	B-Application
filesystems	B-Application
support	O
multiple	O
links	O
(	O
names	O
)	O
for	O
the	O
same	O
file	O
.	O
</s>
<s>
If	O
several	O
such	O
files	O
appear	O
in	O
a	O
tar	B-Application
archive	I-Application
,	O
only	O
the	O
first	O
one	O
is	O
archived	O
as	O
a	O
normal	O
file	O
;	O
the	O
rest	O
are	O
archived	O
as	O
hard	B-Application
links	I-Application
,	O
with	O
the	O
"	O
name	O
of	O
linked	O
file	O
"	O
field	O
set	O
to	O
the	O
first	O
one	O
's	O
name	O
.	O
</s>
<s>
On	O
extraction	O
,	O
such	O
hard	B-Application
links	I-Application
should	O
be	O
recreated	O
in	O
the	O
file	B-Application
system	I-Application
.	O
</s>
<s>
Most	O
modern	O
tar	B-Application
programs	O
read	O
and	O
write	O
archives	O
in	O
the	O
UStar	O
(	O
Unix	B-Application
Standard	O
TAR	B-Application
)	O
format	O
,	O
introduced	O
by	O
the	O
POSIX	O
IEEE	O
P1003.1	O
standard	O
from	O
1988	O
.	O
</s>
<s>
It	O
introduced	O
additional	O
header	B-General_Concept
fields	I-General_Concept
.	O
</s>
<s>
Older	O
tar	B-Application
programs	O
will	O
ignore	O
the	O
extra	O
information	O
(	O
possibly	O
extracting	O
partially	O
named	O
files	O
)	O
,	O
while	O
newer	O
programs	O
will	O
test	O
for	O
the	O
presence	O
of	O
the	O
"	O
ustar	O
"	O
string	O
to	O
determine	O
if	O
the	O
new	O
format	O
is	O
in	O
use	O
.	O
</s>
<s>
POSIX.1-1988	O
vendor	O
specific	O
extensions	O
using	O
link	O
flag	O
values	O
'	O
A'–'Z'	O
partially	O
have	O
a	O
different	O
meaning	O
with	O
different	O
vendors	O
and	O
thus	O
are	O
seen	O
as	O
outdated	O
and	O
replaced	O
by	O
the	O
POSIX.1-2001	O
extensions	O
that	O
also	O
include	O
a	O
vendor	O
tag	O
.	O
</s>
<s>
Few	O
operating	O
systems	O
support	O
creating	O
such	O
files	O
explicitly	O
,	O
and	O
hence	O
most	O
TAR	B-Application
programs	O
do	O
not	O
support	O
them	O
,	O
and	O
will	O
treat	O
type	O
7	O
files	O
as	O
if	O
they	O
were	O
type	O
0	O
(	O
regular	O
)	O
.	O
</s>
<s>
An	O
exception	O
is	O
older	O
versions	O
of	O
GNU	B-Application
tar	I-Application
,	O
when	O
running	O
on	O
the	O
MASSCOMP	O
RTU	O
(	O
Real	O
Time	O
Unix	B-Application
)	O
operating	O
system	O
,	O
which	O
supported	O
an	O
O_CTG	O
flag	O
to	O
the	O
open( )	O
function	O
to	O
request	O
a	O
contiguous	O
file	O
;	O
however	O
,	O
that	O
support	O
was	O
removed	O
from	O
GNU	B-Application
tar	I-Application
version	O
1.24	O
onwards	O
.	O
</s>
<s>
In	O
1997	O
,	O
Sun	O
proposed	O
a	O
method	O
for	O
adding	O
extensions	O
to	O
the	O
tar	B-Application
format	O
.	O
</s>
<s>
This	O
format	O
is	O
known	O
as	O
extended	O
tar	B-Application
format	O
or	O
pax	B-Device
format	O
.	O
</s>
<s>
The	O
new	O
tar	B-Application
format	O
allows	O
users	O
to	O
add	O
any	O
type	O
of	O
vendor-tagged	O
vendor-specific	O
enhancements	O
.	O
</s>
<s>
uid	O
,	O
gid	O
:	O
userid	O
and	O
groupid	O
without	O
size	O
limitation	O
(	O
the	O
historic	O
tar	B-Application
format	O
was	O
is	O
limited	O
to	O
a	O
max	O
.	O
</s>
<s>
In	O
2001	O
,	O
the	O
Star	O
program	O
became	O
the	O
first	O
tar	B-Application
to	O
support	O
the	O
new	O
format	O
.	O
</s>
<s>
In	O
2004	O
,	O
GNU	B-Application
tar	I-Application
supported	O
the	O
new	O
format	O
,	O
though	O
it	O
does	O
not	O
write	O
it	O
as	O
its	O
default	O
output	O
from	O
the	O
tar	B-Application
program	O
yet	O
.	O
</s>
<s>
The	O
pax	B-Device
format	O
is	O
designed	O
so	O
that	O
all	O
implementations	O
able	O
to	O
read	O
the	O
UStar	O
format	O
will	O
be	O
able	O
to	O
read	O
the	O
pax	B-Device
format	O
as	O
well	O
.	O
</s>
<s>
For	O
compatibility	O
,	O
these	O
are	O
encoded	O
in	O
the	O
tar	B-Application
files	I-Application
as	O
special	O
or	O
type	O
files	O
,	O
typically	O
under	O
a	O
directory	B-Application
.	O
</s>
<s>
A	O
pax-supporting	O
implementation	O
would	O
make	O
use	O
of	O
the	O
information	O
,	O
while	O
non-supporting	O
ones	O
like	O
7-Zip	B-Language
would	O
process	O
them	O
as	O
additional	O
files	O
.	O
</s>
<s>
-c	O
,	O
--create	O
—	O
create	O
a	O
new	O
archive	B-Application
;	O
</s>
<s>
-a	O
,	O
--auto-compress	O
—	O
additionally	O
compress	B-Device
the	O
archive	B-Application
with	O
a	O
compressor	O
which	O
will	O
be	O
automatically	O
determined	O
by	O
the	O
file	O
name	O
extension	O
of	O
the	O
archive	B-Application
.	O
</s>
<s>
If	O
the	O
archive	B-Application
's	O
name	O
ends	O
with	O
then	O
use	O
gzip	B-Application
,	O
if	O
then	O
use	O
xz	B-Language
,	O
for	O
Zstandard	B-Language
etc	O
.	O
</s>
<s>
-r	O
,	O
--append	O
—	O
append	O
files	O
to	O
the	O
end	O
of	O
an	O
archive	B-Application
;	O
</s>
<s>
-x	O
,	O
--extract	O
,	O
--get	O
—	O
extract	O
files	O
from	O
an	O
archive	B-Application
;	O
</s>
<s>
-f	O
,	O
--file	O
—	O
specify	O
the	O
archive	B-Application
's	O
name	O
;	O
</s>
<s>
-t	O
,	O
--list	O
—	O
show	O
a	O
list	O
of	O
files	O
and	O
folders	O
in	O
the	O
archive	B-Application
;	O
</s>
<s>
Create	O
an	O
archive	B-Application
file	I-Application
from	O
the	O
file	O
and	O
directory	B-Application
:	O
</s>
<s>
Extract	O
contents	O
for	O
the	O
into	O
the	O
current	O
directory	B-Application
:	O
</s>
<s>
Create	O
an	O
archive	B-Application
file	I-Application
from	O
the	O
file	O
and	O
directory	B-Application
and	O
compress	B-Device
it	O
with	O
gzip	B-Application
:	O
</s>
<s>
Extract	O
contents	O
for	O
the	O
into	O
the	O
current	O
directory	B-Application
:	O
</s>
<s>
A	O
tarpipe	O
is	O
the	O
method	O
of	O
creating	O
an	O
archive	B-Application
on	O
the	O
standard	O
output	O
file	O
of	O
the	O
tar	B-Application
utility	O
and	O
piping	O
it	O
to	O
another	O
tar	B-Application
process	O
on	O
its	O
standard	O
input	O
,	O
working	O
in	O
another	O
directory	B-Application
,	O
where	O
it	O
is	O
unpacked	O
.	O
</s>
<s>
This	O
process	O
copies	O
an	O
entire	O
source	O
directory	B-Application
tree	I-Application
including	O
all	O
special	B-Application
files	I-Application
,	O
for	O
example	O
:	O
</s>
<s>
The	O
tar	B-Application
format	O
continues	O
to	O
be	O
used	O
extensively	O
for	O
open-source	B-Application
software	I-Application
distribution	B-Application
.	O
</s>
<s>
*	O
NIX-distributions	O
use	O
it	O
in	O
various	O
source	O
-	O
and	O
binary-package	O
distribution	B-Application
mechanisms	O
,	O
with	O
most	O
software	O
source	O
code	O
made	O
available	O
in	O
compressed	O
tar	B-Application
archives	I-Application
.	O
</s>
<s>
The	O
original	O
tar	B-Application
format	O
was	O
created	O
in	O
the	O
early	O
days	O
of	O
Unix	B-Application
,	O
and	O
despite	O
current	O
widespread	O
use	O
,	O
many	O
of	O
its	O
design	O
features	O
are	O
considered	O
dated	O
.	O
</s>
<s>
Many	O
older	O
tar	B-Application
implementations	O
do	O
not	O
record	O
nor	O
restore	O
extended	O
attributes	O
(	O
xattrs	O
)	O
or	O
access-control	O
lists	O
(	O
ACLs	O
)	O
.	O
</s>
<s>
In	O
2001	O
,	O
Star	O
introduced	O
support	O
for	O
ACLs	O
and	O
extended	O
attributes	O
,	O
through	O
its	O
own	O
tags	O
for	O
POSIX.1-2001	O
pax	B-Device
.	O
</s>
<s>
More	O
recent	O
versions	O
of	O
GNU	B-Application
tar	I-Application
support	O
Linux	B-Application
extended	O
attributes	O
,	O
reimplementing	O
star	O
extensions	O
.	O
</s>
<s>
A	O
number	O
of	O
extensions	O
are	O
reviewed	O
in	O
the	O
filetype	O
manual	O
for	O
BSD	B-Operating_System
tar	B-Application
,	O
tar(5 )	O
.	O
</s>
<s>
Other	O
formats	O
have	O
been	O
created	O
to	O
address	O
the	O
shortcomings	O
of	O
tar	B-Application
.	O
</s>
<s>
A	O
tarbomb	O
,	O
in	O
hacker	O
slang	O
,	O
is	O
a	O
tar	B-Application
file	I-Application
that	O
contains	O
many	O
files	O
that	O
extract	O
into	O
the	O
working	O
directory	B-Application
.	O
</s>
<s>
Such	O
a	O
tar	B-Application
file	I-Application
can	O
create	O
problems	O
by	O
overwriting	O
files	O
of	O
the	O
same	O
name	O
in	O
the	O
working	O
directory	B-Application
,	O
or	O
mixing	O
one	O
project	O
's	O
files	O
into	O
another	O
.	O
</s>
<s>
It	O
is	O
at	O
best	O
an	O
inconvenience	O
to	O
the	O
user	O
,	O
who	O
is	O
obliged	O
to	O
identify	O
and	O
delete	O
a	O
number	O
of	O
files	O
interspersed	O
with	O
the	O
directory	B-Application
's	O
other	O
contents	O
.	O
</s>
<s>
Such	O
behavior	O
is	O
considered	O
bad	O
etiquette	O
on	O
the	O
part	O
of	O
the	O
archive	B-Application
's	O
creator	O
.	O
</s>
<s>
A	O
related	O
problem	O
is	O
the	O
use	O
of	O
absolute	B-Application
paths	I-Application
or	O
parent	B-Application
directory	I-Application
references	O
when	O
creating	O
tar	B-Application
files	I-Application
.	O
</s>
<s>
Files	O
extracted	O
from	O
such	O
archives	O
will	O
often	O
be	O
created	O
in	O
unusual	O
locations	O
outside	O
the	O
working	O
directory	B-Application
and	O
,	O
like	O
a	O
tarbomb	O
,	O
have	O
the	O
potential	O
to	O
overwrite	O
existing	O
files	O
.	O
</s>
<s>
However	O
,	O
modern	O
versions	O
of	O
FreeBSD	B-Operating_System
and	O
GNU	B-Application
tar	I-Application
do	O
not	O
create	O
or	O
extract	O
absolute	B-Application
paths	I-Application
and	O
parent-directory	O
references	O
by	O
default	O
,	O
unless	O
it	O
is	O
explicitly	O
allowed	O
with	O
the	O
flag	O
or	O
the	O
option	O
.	O
</s>
<s>
The	O
bsdtar	O
program	O
,	O
which	O
is	O
also	O
available	O
on	O
many	O
operating	O
systems	O
and	O
is	O
the	O
default	O
tar	B-Application
utility	O
on	O
Mac	B-Application
OS	I-Application
X	I-Application
v10.6	O
,	O
also	O
does	O
not	O
follow	O
parent-directory	O
references	O
or	O
symbolic	B-Application
links	I-Application
.	O
</s>
<s>
If	O
a	O
user	O
has	O
only	O
a	O
very	O
old	O
tar	B-Application
available	O
,	O
which	O
does	O
not	O
feature	O
those	O
security	O
measures	O
,	O
these	O
problems	O
can	O
be	O
mitigated	O
by	O
first	O
examining	O
a	O
tar	B-Application
file	I-Application
using	O
the	O
command	B-Application
tar	B-Application
tf	O
archive.tar	O
,	O
which	O
lists	O
the	O
contents	O
and	O
allows	O
to	O
exclude	O
problematic	O
files	O
afterwards	O
.	O
</s>
<s>
These	O
commands	O
do	O
not	O
extract	O
any	O
files	O
,	O
but	O
display	O
the	O
names	O
of	O
all	O
files	O
in	O
the	O
archive	B-Application
.	O
</s>
<s>
If	O
any	O
are	O
problematic	O
,	O
the	O
user	O
can	O
create	O
a	O
new	O
empty	O
directory	B-Application
and	O
extract	O
the	O
archive	B-Application
into	O
it	O
—	O
or	O
avoid	O
the	O
tar	B-Application
file	I-Application
entirely	O
.	O
</s>
<s>
Most	O
graphical	O
tools	O
can	O
display	O
the	O
contents	O
of	O
the	O
archive	B-Application
before	O
extracting	O
them	O
.	O
</s>
<s>
Vim	B-Application
can	O
open	O
tar	B-Application
archives	I-Application
and	O
display	O
their	O
contents	O
.	O
</s>
<s>
GNU	B-Application
Emacs	I-Application
is	O
also	O
able	O
to	O
open	O
a	O
tar	B-Application
archive	I-Application
and	O
display	O
its	O
contents	O
in	O
a	O
dired	B-Operating_System
buffer	O
.	O
</s>
<s>
The	O
tar	B-Application
format	O
was	O
designed	O
without	O
a	O
centralized	O
index	O
or	O
table	O
of	O
content	O
for	O
files	O
and	O
their	O
properties	O
for	O
streaming	O
to	O
tape	O
backup	O
devices	O
.	O
</s>
<s>
The	O
archive	B-Application
must	O
be	O
read	O
sequentially	O
to	O
list	O
or	O
extract	O
files	O
.	O
</s>
<s>
For	O
large	O
tar	B-Application
archives	I-Application
,	O
this	O
causes	O
a	O
performance	O
penalty	O
,	O
making	O
tar	B-Application
archives	I-Application
unsuitable	O
for	O
situations	O
that	O
often	O
require	O
random	O
access	O
to	O
individual	O
files	O
.	O
</s>
<s>
Another	O
issue	O
with	O
tar	B-Application
format	O
is	O
that	O
it	O
allows	O
several	O
(	O
possibly	O
different	O
)	O
files	O
in	O
archive	B-Application
to	O
have	O
identical	O
path	O
and	O
filename	O
.	O
</s>
<s>
When	O
extracting	O
such	O
archive	B-Application
,	O
usually	O
the	O
latter	O
version	O
of	O
a	O
file	O
overwrites	O
the	O
former	O
.	O
</s>
<s>
This	O
can	O
create	O
a	O
non-explicit	O
(	O
unobvious	O
)	O
tarbomb	O
,	O
which	O
technically	O
does	O
not	O
contain	O
files	O
with	O
absolute	B-Application
paths	I-Application
or	O
referring	O
parent	B-Application
directories	I-Application
,	O
but	O
still	O
causes	O
overwriting	O
files	O
outside	O
current	O
directory	B-Application
(	O
for	O
example	O
,	O
archive	B-Application
may	O
contain	O
two	O
files	O
with	O
the	O
same	O
path	O
and	O
filename	O
,	O
first	O
of	O
which	O
is	O
a	O
symlink	B-Application
to	O
some	O
location	O
outside	O
current	O
directory	B-Application
,	O
and	O
second	O
of	O
which	O
is	O
a	O
regular	O
file	O
;	O
then	O
extracting	O
such	O
archive	B-Application
on	O
some	O
tar	B-Application
implementations	O
may	O
cause	O
writing	O
to	O
the	O
location	O
pointed	O
to	O
by	O
the	O
symlink	B-Application
)	O
.	O
</s>
<s>
Historically	O
,	O
many	O
systems	O
have	O
implemented	O
tar	B-Application
,	O
and	O
many	O
general	B-Application
file	I-Application
archivers	I-Application
have	O
at	O
least	O
partial	O
support	O
for	O
tar	B-Application
(	O
often	O
using	O
one	O
of	O
the	O
implementations	O
below	O
)	O
.	O
</s>
<s>
The	O
history	O
of	O
tar	B-Application
is	O
a	O
story	O
of	O
incompatibilities	O
,	O
known	O
as	O
the	O
"	O
tar	B-Application
wars	O
"	O
.	O
</s>
<s>
Most	O
tar	B-Application
implementations	O
can	O
also	O
read	O
and	O
create	O
cpio	B-Application
and	O
pax	B-Device
(	O
the	O
latter	O
actually	O
is	O
a	O
tar-format	O
with	O
POSIX-2001-extensions	O
)	O
.	O
</s>
<s>
GNU	B-Application
tar	I-Application
is	O
the	O
default	O
on	O
most	O
Linux	B-Application
distributions	O
.	O
</s>
<s>
Recent	O
versions	O
can	O
use	O
various	O
formats	O
,	O
including	O
ustar	O
,	O
pax	B-Device
,	O
GNU	B-Operating_System
and	O
v7	O
formats	O
.	O
</s>
<s>
FreeBSD	B-Operating_System
tar	B-Application
(	O
also	O
BSD	B-Operating_System
tar	B-Application
)	O
has	O
become	O
the	O
default	O
tar	B-Application
on	O
most	O
Berkeley	O
Software	O
Distribution-based	O
operating	O
systems	O
including	O
Mac	B-Application
OS	I-Application
X	I-Application
.	O
</s>
<s>
This	O
implementation	O
automatically	O
detects	O
the	O
format	O
of	O
the	O
file	O
and	O
can	O
extract	O
from	O
tar	B-Application
,	O
pax	B-Device
,	O
cpio	B-Application
,	O
zip	O
,	O
rar	O
,	O
ar	O
,	O
xar	O
,	O
rpm	O
and	O
ISO	O
9660	O
cdrom	O
images	O
.	O
</s>
<s>
It	O
also	O
comes	O
with	O
a	O
functionally	O
equivalent	O
cpio	B-Application
command-line	B-Application
interface	I-Application
.	O
</s>
<s>
Schily	O
tar	B-Application
,	O
better	O
known	O
as	O
star	O
,	O
is	O
historically	O
significant	O
as	O
some	O
of	O
its	O
extensions	O
were	O
quite	O
popular	O
.	O
</s>
<s>
Python	O
tarfile	B-Application
module	O
supports	O
multiple	O
tar	B-Application
formats	O
,	O
including	O
ustar	O
,	O
pax	B-Device
and	O
gnu	B-Operating_System
;	O
it	O
can	O
read	O
but	O
not	O
create	O
V7	O
format	O
and	O
the	O
SunOS	O
tar	B-Application
extended	O
format	O
;	O
pax	B-Device
is	O
the	O
default	O
format	O
for	O
creation	O
of	O
archives	O
.	O
</s>
<s>
Additionally	O
,	O
most	O
pax	B-Device
and	O
cpio	B-Application
implementations	O
can	O
read	O
and	O
create	O
multiple	O
types	O
of	O
tar	B-Application
files	I-Application
.	O
</s>
<s>
tar	B-Application
archive	I-Application
files	O
usually	O
have	O
the	O
file	O
suffix	O
.tar	B-Application
(	O
e.g.	O
</s>
<s>
somefile.tar	O
)	O
.	O
</s>
<s>
A	O
tar	B-Application
archive	I-Application
file	O
contains	O
uncompressed	B-General_Concept
byte	B-Application
streams	O
of	O
the	O
files	O
which	O
it	O
contains	O
.	O
</s>
<s>
To	O
achieve	O
archive	B-Application
compression	B-General_Concept
,	O
a	O
variety	O
of	O
compression	B-General_Concept
programs	I-General_Concept
are	O
available	O
,	O
such	O
as	O
gzip	B-Application
,	O
bzip2	B-Application
,	O
xz	B-Language
,	O
lzip	B-Application
,	O
lzma	B-General_Concept
,	O
zstd	B-Language
,	O
or	O
compress	B-Device
,	O
which	O
compress	B-Device
the	O
entire	O
tar	B-Application
archive	I-Application
.	O
</s>
<s>
Typically	O
,	O
the	O
compressed	O
form	O
of	O
the	O
archive	B-Application
receives	O
a	O
filename	O
by	O
appending	O
the	O
format-specific	O
compressor	O
suffix	O
to	O
the	O
archive	B-Application
file	I-Application
name	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
tar	B-Application
archive	I-Application
archive.tar	O
,	O
is	O
named	O
archive.tar.gz	O
,	O
when	O
it	O
is	O
compressed	O
by	O
gzip	B-Application
.	O
</s>
<s>
Popular	O
tar	B-Application
programs	O
like	O
the	O
BSD	B-Operating_System
and	O
GNU	B-Operating_System
versions	O
of	O
tar	B-Application
support	O
the	O
command	B-Application
line	I-Application
options	I-Application
Z	B-Device
(	O
compress	B-Device
)	O
,	O
z	B-Device
(	O
gzip	B-Application
)	O
,	O
and	O
j	O
(	O
bzip2	B-Application
)	O
to	O
compress	B-Device
or	O
decompress	O
the	O
archive	B-Application
file	I-Application
upon	O
creation	O
or	O
unpacking	O
.	O
</s>
<s>
Relatively	O
recent	O
additions	O
include	O
--lzma	O
(	O
LZMA	B-General_Concept
)	O
,	O
--lzop	O
(	O
lzop	B-Application
)	O
,	O
--xz	O
or	O
J	O
(	O
xz	B-Language
)	O
,	O
--lzip	O
(	O
lzip	B-Application
)	O
,	O
and	O
--zstd	O
.	O
</s>
<s>
The	O
decompression	O
of	O
these	O
formats	O
is	O
handled	O
automatically	O
if	O
supported	O
filename	O
extensions	O
are	O
used	O
,	O
and	O
compression	B-General_Concept
is	O
handled	O
automatically	O
using	O
the	O
same	O
filename	O
extensions	O
if	O
the	O
option	O
--auto-compress	O
(	O
short	O
form	O
-a	O
)	O
is	O
passed	O
to	O
an	O
applicable	O
version	O
of	O
GNU	B-Application
tar	I-Application
.	O
</s>
<s>
BSD	B-Operating_System
tar	B-Application
detects	O
an	O
even	O
wider	O
range	O
of	O
compressors	O
(	O
lrzip	O
,	O
lz4	B-Language
)	O
,	O
using	O
not	O
the	O
filename	O
but	O
the	O
data	O
within	O
.	O
</s>
<s>
MS-DOS	B-Application
'	O
s	O
8.3	O
filename	O
limitations	O
resulted	O
in	O
additional	O
conventions	O
for	O
naming	O
compressed	O
tar	B-Application
archives	I-Application
.	O
</s>
<s>
However	O
,	O
this	O
practice	O
has	O
declined	O
with	O
FAT	B-Application
now	O
offering	O
long	O
filenames	O
.	O
</s>
