head	1.22;
access;
symbols
	libarchive-3-8-7:1.1.1.23
	libarchive-3-8-6:1.1.1.22
	pkgsrc-2026Q1:1.20.0.2
	pkgsrc-2026Q1-base:1.20
	libarchive-3-8-5:1.1.1.21
	libarchive-3-8-4:1.1.1.20
	pkgsrc-2025Q4:1.18.0.2
	pkgsrc-2025Q4-base:1.18
	libarchive-3-8-3:1.1.1.19
	libarchive-3-8-2:1.1.1.18
	pkgsrc-2025Q3:1.16.0.2
	pkgsrc-2025Q3-base:1.16
	libarchive-3-8-1:1.1.1.17
	pkgsrc-2025Q2:1.15.0.2
	pkgsrc-2025Q2-base:1.15
	libarchive-3-8-0:1.1.1.16
	libarchive-3-7-9:1.1.1.15
	pkgsrc-2025Q1:1.13.0.4
	pkgsrc-2025Q1-base:1.13
	pkgsrc-2024Q4:1.13.0.2
	pkgsrc-2024Q4-base:1.13
	libarchive-3-7-7:1.1.1.14
	pkgsrc-2024Q3:1.12.0.2
	pkgsrc-2024Q3-base:1.12
	libarchive-3-7-5:1.1.1.13
	pkgsrc-2024Q2:1.11.0.2
	pkgsrc-2024Q2-base:1.11
	libarchive-3-7-4:1.1.1.12
	libarchive-3-7-3:1.1.1.11
	pkgsrc-2024Q1:1.9.0.2
	pkgsrc-2024Q1-base:1.9
	libarchive-3-7-2:1.1.1.10
	pkgsrc-2023Q4:1.8.0.30
	pkgsrc-2023Q4-base:1.8
	pkgsrc-2023Q3:1.8.0.28
	pkgsrc-2023Q3-base:1.8
	pkgsrc-2023Q2:1.8.0.26
	pkgsrc-2023Q2-base:1.8
	pkgsrc-2023Q1:1.8.0.24
	pkgsrc-2023Q1-base:1.8
	pkgsrc-2022Q4:1.8.0.22
	pkgsrc-2022Q4-base:1.8
	pkgsrc-2022Q3:1.8.0.20
	pkgsrc-2022Q3-base:1.8
	pkgsrc-2022Q2:1.8.0.18
	pkgsrc-2022Q2-base:1.8
	pkgsrc-2022Q1:1.8.0.16
	pkgsrc-2022Q1-base:1.8
	pkgsrc-2021Q4:1.8.0.14
	pkgsrc-2021Q4-base:1.8
	pkgsrc-2021Q3:1.8.0.12
	pkgsrc-2021Q3-base:1.8
	pkgsrc-2021Q2:1.8.0.10
	pkgsrc-2021Q2-base:1.8
	pkgsrc-2021Q1:1.8.0.8
	pkgsrc-2021Q1-base:1.8
	pkgsrc-2020Q4:1.8.0.6
	pkgsrc-2020Q4-base:1.8
	pkgsrc-2020Q3:1.8.0.4
	pkgsrc-2020Q3-base:1.8
	pkgsrc-2020Q2:1.8.0.2
	pkgsrc-2020Q2-base:1.8
	pkgsrc-2020Q1:1.7.0.4
	pkgsrc-2020Q1-base:1.7
	pkgsrc-2019Q4:1.7.0.6
	pkgsrc-2019Q4-base:1.7
	pkgsrc-2019Q3:1.7.0.2
	pkgsrc-2019Q3-base:1.7
	libarchive-3-4-0:1.1.1.9
	libarchive-3-3-3:1.1.1.8
	pkgsrc-2019Q2:1.6.0.2
	pkgsrc-2019Q2-base:1.6
	pkgsrc-2019Q1:1.5.0.16
	pkgsrc-2019Q1-base:1.5
	pkgsrc-2018Q4:1.5.0.14
	pkgsrc-2018Q4-base:1.5
	pkgsrc-2018Q3:1.5.0.12
	pkgsrc-2018Q3-base:1.5
	pkgsrc-2018Q2:1.5.0.10
	pkgsrc-2018Q2-base:1.5
	pkgsrc-2018Q1:1.5.0.8
	pkgsrc-2018Q1-base:1.5
	pkgsrc-2017Q4:1.5.0.6
	pkgsrc-2017Q4-base:1.5
	pkgsrc-2017Q3:1.5.0.4
	pkgsrc-2017Q3-base:1.5
	libarchive-3-3-2:1.1.1.7
	pkgsrc-2017Q2:1.4.0.4
	pkgsrc-2017Q2-base:1.4
	pkgsrc-2017Q1:1.4.0.2
	pkgsrc-2017Q1-base:1.4
	libarchive-3-3-1:1.1.1.6
	pkgsrc-2016Q4:1.3.0.6
	pkgsrc-2016Q4-base:1.3
	pkgsrc-2016Q3:1.3.0.4
	pkgsrc-2016Q3-base:1.3
	pkgsrc-2016Q2:1.3.0.2
	pkgsrc-2016Q2-base:1.3
	libarchive-3-2-1:1.1.1.5
	pkgsrc-2016Q1:1.2.0.10
	pkgsrc-2016Q1-base:1.2
	pkgsrc-2015Q4:1.2.0.8
	pkgsrc-2015Q4-base:1.2
	pkgsrc-2015Q3:1.2.0.6
	pkgsrc-2015Q3-base:1.2
	pkgsrc-2015Q2:1.2.0.4
	pkgsrc-2015Q2-base:1.2
	pkgsrc-2015Q1:1.2.0.2
	pkgsrc-2015Q1-base:1.2
	pkgsrc-2014Q4:1.1.1.4.0.36
	pkgsrc-2014Q4-base:1.1.1.4
	pkgsrc-2014Q3:1.1.1.4.0.34
	pkgsrc-2014Q3-base:1.1.1.4
	pkgsrc-2014Q2:1.1.1.4.0.32
	pkgsrc-2014Q2-base:1.1.1.4
	pkgsrc-2014Q1:1.1.1.4.0.30
	pkgsrc-2014Q1-base:1.1.1.4
	pkgsrc-2013Q4:1.1.1.4.0.28
	pkgsrc-2013Q4-base:1.1.1.4
	pkgsrc-2013Q3:1.1.1.4.0.26
	pkgsrc-2013Q3-base:1.1.1.4
	pkgsrc-2013Q2:1.1.1.4.0.24
	pkgsrc-2013Q2-base:1.1.1.4
	pkgsrc-2013Q1:1.1.1.4.0.22
	pkgsrc-2013Q1-base:1.1.1.4
	pkgsrc-2012Q4:1.1.1.4.0.20
	pkgsrc-2012Q4-base:1.1.1.4
	pkgsrc-2012Q3:1.1.1.4.0.18
	pkgsrc-2012Q3-base:1.1.1.4
	pkgsrc-2012Q2:1.1.1.4.0.16
	pkgsrc-2012Q2-base:1.1.1.4
	pkgsrc-2012Q1:1.1.1.4.0.14
	pkgsrc-2012Q1-base:1.1.1.4
	pkgsrc-2011Q4:1.1.1.4.0.12
	pkgsrc-2011Q4-base:1.1.1.4
	pkgsrc-2011Q3:1.1.1.4.0.10
	pkgsrc-2011Q3-base:1.1.1.4
	pkgsrc-2011Q2:1.1.1.4.0.8
	pkgsrc-2011Q2-base:1.1.1.4
	pkgsrc-2011Q1:1.1.1.4.0.6
	pkgsrc-2011Q1-base:1.1.1.4
	pkgsrc-2010Q4:1.1.1.4.0.4
	pkgsrc-2010Q4-base:1.1.1.4
	pkgsrc-2010Q3:1.1.1.4.0.2
	pkgsrc-2010Q3-base:1.1.1.4
	libarchive-2-8-4:1.1.1.4
	pkgsrc-2010Q2:1.1.1.3.0.4
	pkgsrc-2010Q2-base:1.1.1.3
	pkgsrc-2010Q1:1.1.1.3.0.2
	pkgsrc-2010Q1-base:1.1.1.3
	libarchive-2-8-3:1.1.1.3
	libarchive-2-8-2:1.1.1.2
	libarchive-2-8-0:1.1.1.1
	KIENTZLE:1.1.1;
locks; strict;
comment	@# @;


1.22
date	2026.04.15.08.46.34;	author adam;	state Exp;
branches;
next	1.21;
commitid	pL26mrnh4kOo62CG;

1.21
date	2026.03.26.11.20.06;	author adam;	state Exp;
branches;
next	1.20;
commitid	8pSUUUHFeJu1BtzG;

1.20
date	2026.01.06.11.55.22;	author adam;	state Exp;
branches;
next	1.19;
commitid	lOosf75XWhczkkpG;

1.19
date	2025.12.23.14.01.22;	author adam;	state Exp;
branches;
next	1.18;
commitid	3zKcl3VhUVXFtxnG;

1.18
date	2025.11.20.06.08.25;	author adam;	state Exp;
branches;
next	1.17;
commitid	kB7NF5kSlmUaVfjG;

1.17
date	2025.11.02.08.52.13;	author adam;	state Exp;
branches;
next	1.16;
commitid	hdaVwMAEUWR8pXgG;

1.16
date	2025.07.01.15.14.43;	author adam;	state Exp;
branches;
next	1.15;
commitid	sA2cBFYBXpUBv31G;

1.15
date	2025.05.21.15.25.49;	author adam;	state Exp;
branches;
next	1.14;
commitid	6aTN21WjRYk8TMVF;

1.14
date	2025.04.28.10.31.33;	author adam;	state Exp;
branches;
next	1.13;
commitid	Tocq615J6mYPZNSF;

1.13
date	2024.10.19.05.39.56;	author adam;	state Exp;
branches;
next	1.12;
commitid	fYRSlpIWMYluweuF;

1.12
date	2024.09.15.07.02.19;	author adam;	state Exp;
branches;
next	1.11;
commitid	x365AQIKhret4SpF;

1.11
date	2024.04.30.06.05.18;	author adam;	state Exp;
branches;
next	1.10;
commitid	id0E8i4RwCC4c88F;

1.10
date	2024.04.12.15.39.49;	author adam;	state Exp;
branches;
next	1.9;
commitid	52ilmjFHKDf0XR5F;

1.9
date	2024.01.18.18.00.14;	author adam;	state Exp;
branches;
next	1.8;
commitid	hNXpsHx3SuHqsXUE;

1.8
date	2020.05.26.09.16.40;	author nia;	state Exp;
branches;
next	1.7;
commitid	nNhsdZACz3PjmJ9C;

1.7
date	2019.09.22.09.55.07;	author joerg;	state Exp;
branches;
next	1.6;
commitid	FdPvRjF4OzwBwZDB;

1.6
date	2019.04.10.08.24.05;	author adam;	state Exp;
branches;
next	1.5;
commitid	LnliQ9ieqYkikMiB;

1.5
date	2017.08.01.22.26.22;	author joerg;	state Exp;
branches;
next	1.4;
commitid	32clTfkmVE8bPy1A;

1.4
date	2017.02.25.21.11.19;	author joerg;	state Exp;
branches;
next	1.3;
commitid	rW8QfCWrsCO1snHz;

1.3
date	2016.06.20.17.24.56;	author joerg;	state Exp;
branches;
next	1.2;
commitid	ArUvympBjfBseebz;

1.2
date	2015.01.17.12.44.49;	author adam;	state Exp;
branches;
next	1.1;
commitid	yy7e1hLrfmA2pn6y;

1.1
date	2010.02.20.03.49.45;	author joerg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.02.20.03.49.45;	author joerg;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2010.03.14.17.57.28;	author joerg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2010.03.16.17.07.07;	author joerg;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2010.07.09.11.53.35;	author joerg;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2016.06.20.17.11.54;	author joerg;	state Exp;
branches;
next	1.1.1.6;
commitid	rRgm3BqbmbI8aebz;

1.1.1.6
date	2017.02.25.20.54.23;	author joerg;	state Exp;
branches;
next	1.1.1.7;
commitid	ReqPI0ibLYjdmnHz;

1.1.1.7
date	2017.08.01.22.21.11;	author joerg;	state Exp;
branches;
next	1.1.1.8;
commitid	XQwPAFJku336Ny1A;

1.1.1.8
date	2019.09.22.09.47.03;	author joerg;	state Exp;
branches;
next	1.1.1.9;
commitid	N0KxAXOYyULduZDB;

1.1.1.9
date	2019.09.22.09.51.33;	author joerg;	state Exp;
branches;
next	1.1.1.10;
commitid	5kDbfPbiV3INvZDB;

1.1.1.10
date	2024.01.18.17.37.45;	author adam;	state Exp;
branches;
next	1.1.1.11;
commitid	zDULEPUODGjTkXUE;

1.1.1.11
date	2024.04.12.15.27.44;	author adam;	state Exp;
branches;
next	1.1.1.12;
commitid	tQWTddCoxBumSR5F;

1.1.1.12
date	2024.04.30.05.50.49;	author adam;	state Exp;
branches;
next	1.1.1.13;
commitid	e4DnFoZdQV9Z688F;

1.1.1.13
date	2024.09.15.06.45.25;	author adam;	state Exp;
branches;
next	1.1.1.14;
commitid	pOuXKsbh8iPCYRpF;

1.1.1.14
date	2024.10.19.05.27.34;	author adam;	state Exp;
branches;
next	1.1.1.15;
commitid	v1iXM4j1Na52seuF;

1.1.1.15
date	2025.04.28.09.44.10;	author adam;	state Exp;
branches;
next	1.1.1.16;
commitid	1zB7ffc4d2qCJNSF;

1.1.1.16
date	2025.05.21.15.11.28;	author adam;	state Exp;
branches;
next	1.1.1.17;
commitid	Nzqt2UgtvkVXNMVF;

1.1.1.17
date	2025.07.01.14.58.53;	author adam;	state Exp;
branches;
next	1.1.1.18;
commitid	wKXYoBc9F9j8q31G;

1.1.1.18
date	2025.11.02.08.32.34;	author adam;	state Exp;
branches;
next	1.1.1.19;
commitid	8C56Xg3dc0HriXgG;

1.1.1.19
date	2025.11.20.05.51.45;	author adam;	state Exp;
branches;
next	1.1.1.20;
commitid	LC6NMc2P0QpnPfjG;

1.1.1.20
date	2025.12.23.13.41.06;	author adam;	state Exp;
branches;
next	1.1.1.21;
commitid	hhQbXTytJ7PFmxnG;

1.1.1.21
date	2026.01.06.11.43.29;	author adam;	state Exp;
branches;
next	1.1.1.22;
commitid	Q4rjOheYoLWofkpG;

1.1.1.22
date	2026.03.26.11.11.16;	author adam;	state Exp;
branches;
next	1.1.1.23;
commitid	P6u0vpfNBymXxtzG;

1.1.1.23
date	2026.04.15.08.40.11;	author adam;	state Exp;
branches;
next	;
commitid	enlkxxj5Vxhi42CG;


desc
@@


1.22
log
@libarchive: updated to 3.8.7

Libarchive 3.8.7 is a security and bugfix release.

Notable fixes:

CAB: fix NULL pointer dereference during skip
CAB: Fix Heap OOB Write in CAB LZX decoder
cpio: various fixes and improvements
contrib/untar: fix out-of-bounds read
iso9660: fix undefined behavior
iso9660: fix posibble heap buffer overflow on 32-bit systems
libarchive: fix handling of option failures
libarchive: do not continue with truncated numbers
libarchive: lzop and grzip filter support
RAR: fix LZSS window size mismatch after PPMd block
@
text
@<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Mon Apr 13 12:57:35 2026 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p><i>TAR</i>(5) File Formats Manual <i>TAR</i>(5)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:9%;">tar &mdash; format of tape
archive files</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:9%;">The <b>tar</b> archive format
collects any number of files, directories, and other file
system objects (symbolic links, device nodes, etc.) into a
single stream of bytes. The format was originally designed
to be used with tape drives that operate with fixed-size
blocks, but is widely used as a general packaging
mechanism.</p>

<p style="margin-left:4%; margin-top: 1em"><b>General
Format</b></p>

<p style="margin-left:9%;">A <b>tar</b> archive consists of
a series of 512-byte records. Each file system object
requires a header record which stores basic metadata
(pathname, owner, permissions, etc.) and zero or more
records containing any file data. The end of the archive is
indicated by two records consisting entirely of zero
bytes.</p>

<p style="margin-left:9%; margin-top: 1em">For
compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a
fixed number of records with each I/O operation. These
&ldquo;blocks&rdquo; are always a multiple of the record
size. The maximum block size supported by early
implementations was 10240 bytes or 20 records. This is still
the default for most implementations although block sizes of
1MiB (2048 records) or larger are commonly used with modern
high-speed tape drives. (Note: the terms &ldquo;block&rdquo;
and &ldquo;record&rdquo; here are not entirely standard;
this document follows the convention established by John
Gilmore in documenting <b>pdtar</b>.)</p>

<p style="margin-left:4%; margin-top: 1em"><b>Old-Style
Archive Format</b></p>

<p style="margin-left:9%;">The original tar archive format
has been extended many times to include additional
information that various implementors found necessary. This
section describes the variant implemented by the tar command
included in Version&nbsp;7 AT&amp;T UNIX, which seems to be
the earliest widely-used version of the tar program.</p>

<p style="margin-left:9%; margin-top: 1em">The header
record for an old-style <b>tar</b> archive consists of the
following:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_old_tar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char name[100];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mode[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char uid[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char gid[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char size[12];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mtime[12];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char checksum[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char linkflag[1];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char linkname[100];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char pad[255];</p></td>
<td width="63%">
</td></tr>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-left:9%;">All unused bytes in the header
record are filled with nulls.</p>

<p style="margin-top: 1em"><i>name</i></p>

<p style="margin-left:19%; margin-top: 1em">Pathname,
stored as a null-terminated string. Early tar
implementations only stored regular files (including
hardlinks to those files). One common early convention used
a trailing &quot;/&quot; character to indicate a directory
name, allowing directory permissions and owner information
to be archived and restored.</p>

<p style="margin-top: 1em"><i>mode</i></p>

<p style="margin-left:19%; margin-top: 1em">File mode,
stored as an octal number in ASCII.</p>

<p style="margin-top: 1em"><i>uid</i>, <i>gid</i></p>

<p style="margin-left:19%;">User id and group id of owner,
as octal numbers in ASCII.</p>

<p style="margin-top: 1em"><i>size</i></p>

<p style="margin-left:19%; margin-top: 1em">Size of file,
as octal number in ASCII. For regular files only, this
indicates the amount of data that follows the header. In
particular, this field was ignored by early tar
implementations when extracting hardlinks. Modern writers
should always store a zero length for hardlink entries.</p>

<p style="margin-top: 1em"><i>mtime</i></p>

<p style="margin-left:19%; margin-top: 1em">Modification
time of file, as an octal number in ASCII. This indicates
the number of seconds since the start of the epoch, 00:00:00
UTC January 1, 1970. Note that negative values should be
avoided here, as they are handled inconsistently.</p>

<p style="margin-top: 1em"><i>checksum</i></p>

<p style="margin-left:19%;">Header checksum, stored as an
octal number in ASCII. To compute the checksum, set the
checksum field to all spaces, then sum all bytes in the
header using unsigned arithmetic. This field should be
stored as six octal digits followed by a null and a space
character. Note that many early implementations of tar used
signed arithmetic for the checksum field, which can cause
interoperability problems when transferring archives between
systems. Modern robust readers compute the checksum both
ways and accept the header if either computation
matches.</p>

<p style="margin-top: 1em"><i>linkflag</i>,
<i>linkname</i></p>

<p style="margin-left:19%;">In order to preserve hardlinks
and conserve tape, a file with multiple links is only
written to the archive the first time it is encountered. The
next time it is encountered, the <i>linkflag</i> is set to
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
the first name under which this file appears. (Note that
regular files have a null value in the <i>linkflag</i>
field.)</p>

<p style="margin-left:9%; margin-top: 1em">Early tar
implementations varied in how they terminated these fields.
The tar command in Version&nbsp;7 AT&amp;T UNIX used the
following conventions (this is also documented in early BSD
manpages): the pathname must be null-terminated; the mode,
uid, and gid fields must end in a space and a null byte; the
size and mtime fields must end in a space; the checksum is
terminated by a null and a space. Early implementations
filled the numeric fields with leading spaces. This seems to
have been common practice until the IEEE Std 1003.1-1988
(&ldquo;POSIX.1&rdquo;) standard was released. For best
portability, modern implementations should fill the numeric
fields with leading zeros.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Pre-POSIX
Archives</b></p>

<p style="margin-left:9%;">An early draft of IEEE Std
1003.1-1988 (&ldquo;POSIX.1&rdquo;) served as the basis for
John Gilmore&rsquo;s <b>pdtar</b> program and many system
implementations from the late 1980s and early 1990s. These
archives generally follow the POSIX ustar format described
below with the following variations:</p>

<p><b>&bull;</b></p>

<p style="margin-left:19%;">The magic value consists of the
five characters &ldquo;ustar&rdquo; followed by a space. The
version field contains a space character followed by a
null.</p>

<p><b>&bull;</b></p>

<p style="margin-left:19%;">The numeric fields are
generally filled with leading spaces (not leading zeros as
recommended in the final standard).</p>

<p><b>&bull;</b></p>

<p style="margin-left:19%;">The prefix field is often not
used, limiting pathnames to the 100 characters of old-style
archives.</p>

<p style="margin-left:4%; margin-top: 1em"><b>POSIX ustar
Archives</b></p>

<p style="margin-left:9%;">IEEE Std 1003.1-1988
(&ldquo;POSIX.1&rdquo;) defined a standard tar file format
to be read and written by compliant implementations of
<i>tar</i>(1). This format is often called the
&ldquo;ustar&rdquo; format, after the magic value used in
the header. (The name is an acronym for &ldquo;Unix Standard
TAR&rdquo;.) It extends the historic format with new
fields:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_posix_ustar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char name[100];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mode[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char uid[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char gid[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char size[12];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mtime[12];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char checksum[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char typeflag[1];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char linkname[100];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char magic[6];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char version[2];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char uname[32];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char gname[32];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char devmajor[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char devminor[8];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char prefix[155];</p></td>
<td width="63%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char pad[12];</p></td>
<td width="63%">
</td></tr>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-top: 1em"><i>typeflag</i></p>

<p style="margin-left:19%;">Type of entry. POSIX extended
the earlier <i>linkflag</i> field with several new type
values:</p>

<p>&ldquo;0&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Regular file.
NUL should be treated as a synonym, for compatibility
purposes.</p>

<p>&ldquo;1&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Hard link.</p>

<p>&ldquo;2&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Symbolic
link.</p>

<p>&ldquo;3&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Character
device node.</p>

<p>&ldquo;4&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Block device
node.</p>

<p>&ldquo;5&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Directory.</p>

<p>&ldquo;6&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">FIFO node.</p>

<p>&ldquo;7&rdquo;</p>

<p style="margin-left:29%; margin-top: 1em">Reserved.</p>

<p>Other</p>

<p style="margin-left:29%; margin-top: 1em">A
POSIX-compliant implementation must treat any unrecognized
typeflag value as a regular file. In particular, writers
should ensure that all entries have a valid filename so that
they can be restored by readers that do not support the
corresponding extension. Uppercase letters &quot;A&quot;
through &quot;Z&quot; are reserved for custom extensions.
Note that sockets and whiteout entries are not
archivable.</p>

<p style="margin-left:19%;">It is worth noting that the
<i>size</i> field, in particular, has different meanings
depending on the type. For regular files, of course, it
indicates the amount of data following the header. For
directories, it may be used to indicate the total size of
all files in the directory, for use by operating systems
that pre-allocate directory space. For all other types, it
should be set to zero by writers and ignored by readers.</p>

<p style="margin-top: 1em"><i>magic</i></p>

<p style="margin-left:19%; margin-top: 1em">Contains the
magic value &ldquo;ustar&rdquo; followed by a NUL byte to
indicate that this is a POSIX standard archive. Full
compliance requires the uname and gname fields be properly
set.</p>

<p style="margin-top: 1em"><i>version</i></p>

<p style="margin-left:19%;">Version. This should be
&ldquo;00&rdquo; (two copies of the ASCII digit zero) for
POSIX standard archives.</p>

<p style="margin-top: 1em"><i>uname</i>, <i>gname</i></p>

<p style="margin-left:19%;">User and group names, as
null-terminated ASCII strings. These should be used in
preference to the uid/gid values when they are set and the
corresponding names exist on the system.</p>

<p style="margin-top: 1em"><i>devmajor</i>,
<i>devminor</i></p>

<p style="margin-left:19%;">Major and minor numbers for
character device or block device entry.</p>

<p style="margin-top: 1em"><i>name</i>, <i>prefix</i></p>

<p style="margin-left:19%;">If the pathname is too long to
fit in the 100 bytes provided by the standard format, it can
be split at any <i>/</i> character with the first portion
going into the prefix field. If the prefix field is not
empty, the reader will prepend the prefix value and a
<i>/</i> character to the regular name field to obtain the
full pathname. The standard does not require a trailing
<i>/</i> character on directory names, though most
implementations still include this for compatibility
reasons.</p>

<p style="margin-left:9%; margin-top: 1em">Note that all
unused bytes must be set to NUL.</p>

<p style="margin-left:9%; margin-top: 1em">Field
termination is specified slightly differently by POSIX than
by previous implementations. The <i>magic</i>, <i>uname</i>,
and <i>gname</i> fields must have a trailing NUL. The
<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields
must have a trailing NUL unless they fill the entire field.
(In particular, it is possible to store a 256-character
pathname if it happens to have a <i>/</i> as the 156th
character.) POSIX requires numeric fields to be zero-padded
in the front, and requires them to be terminated with either
space or NUL characters.</p>

<p style="margin-left:9%; margin-top: 1em">Currently, most
tar implementations comply with the ustar format,
occasionally extending it by adding new fields to the blank
area at the end of the header record.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Numeric
Extensions</b></p>

<p style="margin-left:9%;">There have been several attempts
to extend the range of sizes or times supported by modifying
how numbers are stored in the header.</p>

<p style="margin-left:9%; margin-top: 1em">One obvious
extension to increase the size of files is to eliminate the
terminating characters from the various numeric fields. For
example, the standard only allows the size field to contain
11 octal digits, reserving the twelfth byte for a trailing
NUL character. Allowing 12 octal digits allows file sizes up
to 64 GB.</p>

<p style="margin-left:9%; margin-top: 1em">Another
extension, utilized by GNU tar, star, and other newer
<b>tar</b> implementations, permits binary numbers in the
standard numeric fields. This is flagged by setting the high
bit of the first byte. The remainder of the field is treated
as a signed twos-complement value. This permits 95-bit
values for the length and time fields and 63-bit values for
the uid, gid, and device numbers. In particular, this
provides a consistent way to handle negative time values.
GNU tar supports this extension for the length, mtime,
ctime, and atime fields. Joerg Schilling&rsquo;s star
program and the libarchive library support this extension
for all numeric fields. Note that this extension is largely
obsoleted by the extended attribute record provided by the
pax interchange format.</p>

<p style="margin-left:9%; margin-top: 1em">Another early
GNU extension allowed base-64 values rather than octal. This
extension was short-lived and is no longer supported by any
implementation.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Pax
Interchange Format</b></p>

<p style="margin-left:9%;">There are many attributes that
cannot be portably stored in a POSIX ustar archive. IEEE Std
1003.1-2001 (&ldquo;POSIX.1&rdquo;) defined a &ldquo;pax
interchange format&rdquo; that uses two new types of entries
to hold text-formatted metadata that applies to following
entries. Note that a pax interchange format archive is a
ustar archive in every respect. The new data is stored in
ustar-compatible archive entries that use the
&ldquo;x&rdquo; or &ldquo;g&rdquo; typeflag. In particular,
older implementations that do not fully support these
extensions will extract the metadata into regular files,
where the metadata can be examined as necessary.</p>

<p style="margin-left:9%; margin-top: 1em">An entry in a
pax interchange format archive consists of one or two
standard ustar entries, each with its own header and data.
The first optional entry stores the extended attributes for
the following entry. This optional first entry has an
&quot;x&quot; typeflag and a size field that indicates the
total size of the extended attributes. The extended
attributes themselves are stored as a series of text-format
lines encoded in the portable UTF-8 encoding. Each line
consists of a decimal number, a space, a key string, an
equals sign, a value string, and a new line. The decimal
number indicates the length of the entire line, including
the initial length field and the trailing newline. An
example of such a field is:</p>

<p style="margin-left:17%;"><b>25
ctime=1084839148.1212\n</b></p>

<p style="margin-left:9%;">Keys in all lowercase are
standard keys. Vendors can add their own keys by prefixing
them with an all uppercase vendor name and a period. Note
that, unlike the historic header, numeric values are stored
using decimal, not octal. A description of some common keys
follows:</p>

<p style="margin-top: 1em"><b>atime</b>, <b>ctime</b>,
<b>mtime</b></p>

<p style="margin-left:19%;">File access, inode change, and
modification times. These fields can be negative or include
a decimal point and a fractional value.</p>

<p style="margin-top: 1em"><b>hdrcharset</b></p>

<p style="margin-left:19%;">The character set used by the
pax extension values. By default, all textual values in the
pax extended attributes are assumed to be in UTF-8,
including pathnames, user names, and group names. In some
cases, it is not possible to translate local conventions
into UTF-8. If this key is present and the value is the
six-character ASCII string &ldquo;BINARY&rdquo;, then all
textual values are assumed to be in a platform-dependent
multi-byte encoding. Note that there are only two valid
values for this key: &ldquo;BINARY&rdquo; or
&ldquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rdquo;. No
other values are permitted by the standard, and the latter
value should generally not be used as it is the default when
this key is not specified. In particular, this flag should
not be used as a general mechanism to allow filenames to be
stored in arbitrary encodings.</p>

<p style="margin-top: 1em"><b>uname</b>, <b>uid</b>,
<b>gname</b>, <b>gid</b></p>

<p style="margin-left:19%;">User name, group name, and
numeric UID and GID values. The user name and group name
stored here are encoded in UTF8 and can thus include
non-ASCII characters. The UID and GID fields can be of
arbitrary length.</p>

<p style="margin-top: 1em"><b>linkpath</b></p>

<p style="margin-left:19%;">The full path of the linked-to
file. Note that this is encoded in UTF8 and can thus include
non-ASCII characters.</p>

<p style="margin-top: 1em"><b>path</b></p>

<p style="margin-left:19%; margin-top: 1em">The full
pathname of the entry. Note that this is encoded in UTF8 and
can thus include non-ASCII characters.</p>

<p style="margin-top: 1em"><b>realtime.*</b>,
<b>security.*</b></p>

<p style="margin-left:19%;">These keys are reserved and may
be used for future standardization.</p>

<p style="margin-top: 1em"><b>size</b></p>

<p style="margin-left:19%; margin-top: 1em">The size of the
file. Note that there is no length limit on this field,
allowing conforming archives to store files much larger than
the historic 8GB limit.</p>

<p style="margin-top: 1em"><b>SCHILY.*</b></p>

<p style="margin-left:19%;">Vendor-specific attributes used
by Joerg Schilling&rsquo;s <b>star</b> implementation.</p>

<p style="margin-top: 1em"><b>SCHILY.acl.access</b>,
<b>SCHILY.acl.default</b>, <b>SCHILY.acl.ace</b></p>

<p style="margin-left:19%;">Stores the access, default and
NFSv4 ACLs as textual strings in a format that is an
extension of the format specified by POSIX.1e draft 17. In
particular, each user or group access specification can
include an additional colon-separated field with the numeric
UID or GID. This allows ACLs to be restored on systems that
may not have complete user or group information available
(such as when NIS/YP or LDAP services are temporarily
unavailable).</p>

<p style="margin-top: 1em"><b>SCHILY.devminor</b>,
<b>SCHILY.devmajor</b></p>

<p style="margin-left:19%;">The full minor and major
numbers for device nodes.</p>

<p style="margin-top: 1em"><b>SCHILY.fflags</b></p>

<p style="margin-left:19%;">The file flags.</p>

<p style="margin-top: 1em"><b>SCHILY.realsize</b></p>

<p style="margin-left:19%;">The full size of the file on
disk. XXX explain? XXX</p>

<p style="margin-top: 1em"><b>SCHILY.dev</b>,
<b>SCHILY.ino</b>, <b>SCHILY.nlinks</b></p>

<p style="margin-left:19%;">The device number, inode
number, and link count for the entry. In particular, note
that a pax interchange format archive using Joerg
Schilling&rsquo;s <b>SCHILY.*</b> extensions can store all
of the data from <i>struct stat</i>.</p>

<p style="margin-top: 1em"><b>LIBARCHIVE.*</b></p>

<p style="margin-left:19%;">Vendor-specific attributes used
by the <b>libarchive</b> library and programs that use
it.</p>


<p style="margin-top: 1em"><b>LIBARCHIVE.creationtime</b></p>

<p style="margin-left:19%;">The time when the file was
created. (This should not be confused with the POSIX
&ldquo;ctime&rdquo; attribute, which refers to the time when
the file metadata was last changed.)</p>


<p style="margin-top: 1em"><b>LIBARCHIVE.xattr</b>.<i>namespace</i>.<i>key</i></p>

<p style="margin-left:19%;">Libarchive stores
POSIX.1e-style extended attributes using keys of this form.
The <i>key</i> value is URL-encoded: All non-ASCII
characters and the two special characters &ldquo;=&rdquo;
and &ldquo;%&rdquo; are encoded as &ldquo;%&rdquo; followed
by two uppercase hexadecimal digits. The value of this key
is the extended attribute value encoded in base 64. XXX
Detail the base-64 format here XXX</p>

<p style="margin-top: 1em"><b>VENDOR.*</b></p>

<p style="margin-left:19%;">XXX document other
vendor-specific extensions XXX</p>

<p style="margin-left:9%; margin-top: 1em">Any values
stored in an extended attribute override the corresponding
values in the regular tar header. Note that compliant
readers should ignore the regular fields when they are
overridden. This is important, as existing archivers are
known to store non-compliant values in the standard header
fields in this situation. There are no limits on length for
any of these fields. In particular, numeric fields can be
arbitrarily large. All text fields are encoded in UTF8.
Compliant writers should store only portable 7-bit ASCII
characters in the standard ustar header and use extended
attributes whenever a text value contains non-ASCII
characters.</p>

<p style="margin-left:9%; margin-top: 1em">In addition to
the <b>x</b> entry described above, the pax interchange
format also supports a <b>g</b> entry. The <b>g</b> entry is
identical in format, but specifies attributes that serve as
defaults for all subsequent archive entries. The <b>g</b>
entry is not widely used.</p>

<p style="margin-left:9%; margin-top: 1em">Besides the new
<b>x</b> and <b>g</b> entries, the pax interchange format
has a few other minor variations from the earlier ustar
format. The most troubling one is that hardlinks are
permitted to have data following them. This allows readers
to restore any hardlink to a file without having to rewind
the archive to find an earlier entry. However, it creates
complications for robust readers, as it is no longer clear
whether or not they should ignore the size field for
hardlink entries.</p>

<p style="margin-left:4%; margin-top: 1em"><b>GNU Tar
Archives</b></p>

<p style="margin-left:9%;">The GNU tar program started with
a pre-POSIX format similar to that described earlier and has
extended it using several different mechanisms: It added new
fields to the empty space in the header (some of which was
later used by POSIX for conflicting purposes); it allowed
the header to be continued over multiple records; and it
defined new entries that modify following entries (similar
in principle to the <b>x</b> entry described above, but each
GNU special entry is single-purpose, unlike the
general-purpose <b>x</b> entry). As a result, GNU tar
archives are not POSIX compatible, although more lenient
POSIX-compliant readers can successfully extract most GNU
tar archives.</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_gnu_tar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char name[100];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mode[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char uid[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char gid[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char size[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char mtime[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char checksum[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char typeflag[1];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char linkname[100];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char magic[6];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char version[2];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char uname[32];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char gname[32];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char devmajor[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char devminor[8];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char atime[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char ctime[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char offset[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char longnames[4];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char unused[1];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>struct {</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">
</td>
<td width="10%">


<p>char offset[12];</p></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">
</td>
<td width="10%">


<p>char numbytes[12];</p></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>} sparse[4];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char isextended[1];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char realsize[12];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
<tr valign="top" align="left">
<td width="27%"></td>
<td width="10%">


<p>char pad[17];</p></td>
<td width="10%"></td>
<td width="53%">
</td></tr>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-top: 1em"><i>typeflag</i></p>

<p style="margin-left:19%;">GNU tar uses the following
special entry types, in addition to those defined by
POSIX:</p>

<p style="margin-top: 1em">7</p>

<p style="margin-left:29%; margin-top: 1em">GNU tar treats
type &quot;7&quot; records identically to type &quot;0&quot;
records, except on one obscure RTOS where they are used to
indicate the pre-allocation of a contiguous file on
disk.</p>

<p style="margin-top: 1em">D</p>

<p style="margin-left:29%; margin-top: 1em">This indicates
a directory entry. Unlike the POSIX-standard &quot;5&quot;
typeflag, the header is followed by data records listing the
names of files in this directory. Each name is preceded by
an ASCII &quot;Y&quot; if the file is stored in this archive
or &quot;N&quot; if the file is not stored in this archive.
Each name is terminated with a null, and an extra null marks
the end of the name list. The purpose of this entry is to
support incremental backups; a program restoring from such
an archive may wish to delete files on disk that did not
exist in the directory when the archive was made.</p>

<p style="margin-left:29%; margin-top: 1em">Note that the
&quot;D&quot; typeflag specifically violates POSIX, which
requires that unrecognized typeflags be restored as normal
files. In this case, restoring the &quot;D&quot; entry as a
file could interfere with subsequent creation of the
like-named directory.</p>

<p style="margin-top: 1em">K</p>

<p style="margin-left:29%; margin-top: 1em">The data for
this entry is a long linkname for the following regular
entry.</p>

<p style="margin-top: 1em">L</p>

<p style="margin-left:29%; margin-top: 1em">The data for
this entry is a long pathname for the following regular
entry.</p>

<p style="margin-top: 1em">M</p>

<p style="margin-left:29%; margin-top: 1em">This is a
continuation of the last file on the previous volume. GNU
multi-volume archives guarantee that each volume begins with
a valid entry header. To ensure this, a file may be split,
with part stored at the end of one volume, and part stored
at the beginning of the next volume. The &quot;M&quot;
typeflag indicates that this entry continues an existing
file. Such entries can only occur as the first or second
entry in an archive (the latter only if the first entry is a
volume label). The <i>size</i> field specifies the size of
this entry. The <i>offset</i> field at bytes 369-380
specifies the offset where this file fragment begins. The
<i>realsize</i> field specifies the total size of the file
(which must equal <i>size</i> plus <i>offset</i>). When
extracting, GNU tar checks that the header file name is the
one it is expecting, that the header offset is in the
correct sequence, and that the sum of offset and size is
equal to realsize.</p>

<p style="margin-top: 1em">N</p>

<p style="margin-left:29%; margin-top: 1em">Type
&quot;N&quot; records are no longer generated by GNU tar.
They contained a list of files to be renamed or symlinked
after extraction; this was originally used to support long
names. The contents of this record are a text description of
the operations to be done, in the form &ldquo;Rename %s to
%s\n&rdquo; or &ldquo;Symlink %s to %s\n&rdquo;; in either
case, both filenames are escaped using K&amp;R C syntax. Due
to security concerns, &quot;N&quot; records are now
generally ignored when reading archives.</p>

<p style="margin-top: 1em">S</p>

<p style="margin-left:29%; margin-top: 1em">This is a
&ldquo;sparse&rdquo; regular file. Sparse files are stored
as a series of fragments. The header contains a list of
fragment offset/length pairs. If more than four such entries
are required, the header is extended as necessary with
&ldquo;extra&rdquo; header extensions (an older format that
is no longer used), or &ldquo;sparse&rdquo; extensions.</p>

<p style="margin-top: 1em">V</p>

<p style="margin-left:29%; margin-top: 1em">The <i>name</i>
field should be interpreted as a tape/volume header name.
This entry should generally be ignored on extraction.</p>

<p style="margin-top: 1em"><i>magic</i></p>

<p style="margin-left:19%; margin-top: 1em">The magic field
holds the five characters &ldquo;ustar&rdquo; followed by a
space. Note that POSIX ustar archives have a trailing
null.</p>

<p style="margin-top: 1em"><i>version</i></p>

<p style="margin-left:19%;">The version field holds a space
character followed by a null. Note that POSIX ustar archives
use two copies of the ASCII digit &ldquo;0&rdquo;.</p>

<p style="margin-top: 1em"><i>atime</i>, <i>ctime</i></p>

<p style="margin-left:19%;">The time the file was last
accessed and the time of last change of file information,
stored in octal as with <i>mtime</i>.</p>

<p style="margin-top: 1em"><i>longnames</i></p>

<p style="margin-left:19%;">This field is apparently no
longer used.</p>

<p style="margin-top: 1em">Sparse <i>offset /
numbytes</i></p>

<p style="margin-left:19%;">Each such structure specifies a
single fragment of a sparse file. The two fields store
values as octal numbers. The fragments are each padded to a
multiple of 512 bytes in the archive. On extraction, the
list of fragments is collected from the header (including
any extension headers), and the data is then read and
written to the file at appropriate offsets.</p>

<p style="margin-top: 1em"><i>isextended</i></p>

<p style="margin-left:19%;">If this is set to non-zero, the
header will be followed by additional &ldquo;sparse
header&rdquo; records. Each such record contains information
about as many as 21 additional sparse blocks as shown
here:</p>

<p style="margin-left:27%; margin-top: 1em">struct
gnu_sparse_header {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">


<p>struct {</p></td>
<td width="11%"></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">
</td>
<td width="11%">


<p>char offset[12];</p></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">
</td>
<td width="11%">


<p>char numbytes[12];</p></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">


<p>} sparse[21];</p></td>
<td width="11%"></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">


<p>char isextended[1];</p></td>
<td width="11%"></td>
<td width="42%">
</td></tr>
<tr valign="top" align="left">
<td width="37%"></td>
<td width="10%">


<p>char padding[7];</p></td>
<td width="11%"></td>
<td width="42%">
</td></tr>
</table>

<p style="margin-left:27%;">};</p>

<p style="margin-top: 1em"><i>realsize</i></p>

<p style="margin-left:19%;">A binary representation of the
file&rsquo;s complete size, with a much larger range than
the POSIX file size. In particular, with <b>M</b> type
files, the current entry is only a portion of the file. In
that case, the POSIX size field will indicate the size of
this entry; the <i>realsize</i> field will indicate the
total size of the file.</p>

<p style="margin-left:4%; margin-top: 1em"><b>GNU tar pax
archives</b></p>

<p style="margin-left:9%;">GNU tar 1.14 (XXX check this
XXX) and later will write pax interchange format archives
when you specify the <b>--posix</b> flag. This format
follows the pax interchange format closely, using some
<b>SCHILY</b> tags and introducing new keywords to store
sparse file information. There have been three iterations of
the sparse file support, referred to as &ldquo;0.0&rdquo;,
&ldquo;0.1&rdquo;, and &ldquo;1.0&rdquo;.</p>

<p style="margin-top: 1em"><b>GNU.sparse.numblocks</b>,
<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>,
<b>GNU.sparse.size</b></p>

<p style="margin-left:19%;">The &ldquo;0.0&rdquo; format
used an initial <b>GNU.sparse.numblocks</b> attribute to
indicate the number of blocks in the file, a pair of
<b>GNU.sparse.offset</b> and <b>GNU.sparse.numbytes</b> to
indicate the offset and size of each block, and a single
<b>GNU.sparse.size</b> to indicate the full size of the
file. This is not the same as the size in the tar header
because the latter value does not include the size of any
holes. This format required that the order of attributes be
preserved and relied on readers accepting multiple
appearances of the same attribute names, which is not
officially permitted by the standards.</p>

<p style="margin-top: 1em"><b>GNU.sparse.map</b></p>

<p style="margin-left:19%;">The &ldquo;0.1&rdquo; format
used a single attribute that stored a comma-separated list
of decimal numbers. Each pair of numbers indicated the
offset and size, respectively, of a block of data. This does
not work well if the archive is extracted by an archiver
that does not recognize this extension, since many pax
implementations simply discard unrecognized attributes.</p>

<p style="margin-top: 1em"><b>GNU.sparse.major</b>,
<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>,
<b>GNU.sparse.realsize</b></p>

<p style="margin-left:19%;">The &ldquo;1.0&rdquo; format
stores the sparse block map in one or more 512-byte blocks
prepended to the file data in the entry body. The pax
attributes indicate the existence of this map (via the
<b>GNU.sparse.major</b> and <b>GNU.sparse.minor</b> fields)
and the full size of the file. The <b>GNU.sparse.name</b>
holds the true name of the file. To avoid confusion, the
name stored in the regular tar header is a modified name so
that extraction errors will be apparent to users.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Solaris
Tar</b></p>

<p style="margin-left:9%;">XXX More Details Needed XXX</p>

<p style="margin-left:9%; margin-top: 1em">Solaris tar
(beginning with SunOS XXX 5.7 ?? XXX) supports an
&ldquo;extended&rdquo; format that is fundamentally similar
to pax interchange format, with the following
differences:</p>

<p><b>&bull;</b></p>

<p style="margin-left:19%;">Extended attributes are stored
in an entry whose type is <b>X</b>, not <b>x</b>, as used by
pax interchange format. The detailed format of this entry
appears to be the same as detailed above for the <b>x</b>
entry.</p>

<p><b>&bull;</b></p>

<p style="margin-left:19%;">An additional <b>A</b> header
is used to store an ACL for the following regular entry. The
body of this entry contains a seven-digit octal number
followed by a zero byte, followed by the textual ACL
description. The octal value is the number of ACL entries
plus a constant that indicates the ACL type: 01000000 for
POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p>

<p style="margin-left:4%; margin-top: 1em"><b>AIX
Tar</b></p>

<p style="margin-left:9%;">XXX More details needed XXX</p>

<p style="margin-left:9%; margin-top: 1em">AIX Tar uses a
ustar-formatted header with the type <b>A</b> for storing
coded ACL information. Unlike the Solaris format, AIX tar
writes this header after the regular file body to which it
applies. The pathname in this header is either <b>NFS4</b>
or <b>AIXC</b> to indicate the type of ACL stored. The
actual ACL is stored in platform-specific binary format.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Mac OS X
Tar</b></p>

<p style="margin-left:9%;">The tar distributed with
Apple&rsquo;s Mac OS X stores most regular files as two
separate files in the tar archive. The two files have the
same name except that the first one has &ldquo;._&rdquo;
prepended to the last path element. This special file stores
an AppleDouble-encoded binary blob with additional metadata
about the second file, including ACL, extended attributes,
and resources. To recreate the original file on disk, each
separate file can be extracted and the Mac OS X
<b>copyfile</b>() function can be used to unpack the
separate metadata file and apply it to th regular file.
Conversely, the same function provides a &ldquo;pack&rdquo;
option to encode the extended metadata from a file into a
separate file whose contents can then be put into a tar
archive.</p>

<p style="margin-left:9%; margin-top: 1em">Note that the
Apple extended attributes interact badly with long
filenames. Since each file is stored with the full name, a
separate set of extensions needs to be included in the
archive for each one, doubling the overhead required for
files with long names.</p>

<p style="margin-left:4%; margin-top: 1em"><b>Summary of
tar type codes</b></p>

<p style="margin-left:9%;">The following list is a
condensed summary of the type codes used in tar header
records generated by different tar implementations. More
details about specific implementations can be found
above:</p>

<p>NUL</p>

<p style="margin-left:15%; margin-top: 1em">Early tar
programs stored a zero byte for regular files.</p>

<p><b>0</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a regular file.</p>

<p><b>1</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a hard link description.</p>

<p><b>2</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a symbolic link description.</p>

<p><b>3</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a character device node.</p>

<p><b>4</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a block device node.</p>

<p><b>5</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a directory.</p>

<p><b>6</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX standard
type code for a FIFO.</p>

<p><b>7</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX
reserved.</p>

<p><b>7</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar used
for pre-allocated files on some systems.</p>

<p><b>A</b></p>

<p style="margin-left:15%; margin-top: 1em">Solaris tar ACL
description stored prior to a regular file header.</p>

<p><b>A</b></p>

<p style="margin-left:15%; margin-top: 1em">AIX tar ACL
description stored after the file body.</p>

<p><b>D</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar
directory dump.</p>

<p><b>K</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar long
linkname for the following header.</p>

<p><b>L</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar long
pathname for the following header.</p>

<p><b>M</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar
multivolume marker, indicating the file is a continuation of
a file from the previous volume.</p>

<p><b>N</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar long
filename support. Deprecated.</p>

<p><b>S</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar sparse
regular file.</p>

<p><b>V</b></p>

<p style="margin-left:15%; margin-top: 1em">GNU tar
tape/volume header name.</p>

<p><b>X</b></p>

<p style="margin-left:15%; margin-top: 1em">Solaris tar
general-purpose extension header.</p>

<p><b>g</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX pax
interchange format global extensions.</p>

<p><b>x</b></p>

<p style="margin-left:15%; margin-top: 1em">POSIX pax
interchange format per-file extensions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:9%;"><i>ar</i>(1), <i>pax</i>(1),
<i>tar</i>(1)</p>

<p style="margin-top: 1em"><b>STANDARDS</b></p>

<p style="margin-left:9%;">The <b>tar</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&ldquo;SUSv2&rdquo;). It has been supplanted in subsequent
standards by <i>pax</i>(1). The ustar format is currently
part of the specification for the <i>pax</i>(1) utility. The
pax interchange file format is new with IEEE Std 1003.1-2001
(&ldquo;POSIX.1&rdquo;).</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:9%;">A <b>tar</b> command appeared in
Seventh Edition Unix, which was released in January, 1979.
It replaced the <b>tp</b> program from Fourth Edition Unix
which in turn replaced the <b>tap</b> program from First
Edition Unix. John Gilmore&rsquo;s <b>pdtar</b>
public-domain implementation (circa 1987) was highly
influential and formed the basis of <b>GNU tar</b> (circa
1988). Joerg Shilling&rsquo;s <b>star</b> archiver is
another open-source (CDDL) archiver (originally developed
circa 1985) which features complete support for pax
interchange format.</p>

<p style="margin-left:9%; margin-top: 1em">This
documentation was written as part of the <b>libarchive</b>
and <b>bsdtar</b> project by Tim Kientzle
&lt;kientzle@@FreeBSD.org&gt;. Debian December 27, 2016
<i>TAR</i>(5)</p>
<hr>
</body>
</html>
@


1.21
log
@libarchive: updated to 3.8.6

Libarchive 3.8.6 is a security and bugfix release.

Notable fixes:

libarchive: fix incompatibility with Nettle 4.x
libarchive: fix NULL pointer dereference in archive_acl_from_text_w()
bsdunzip: fix ISO week year and Gregorian year confusion
7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
7zip: fix out-of-bounds access on ELF 64-bit header
RAR5 reader: fix infinite loop in rar5 decompression
RAR5 reader: fix potential memory leak
RAR5: fix SIGSEGV when archive_read_support_format_rar5 is called twice
CAB reader: fix memory leak on repeated calls to archive_read_support_format_cab
mtree reader: Fix file descriptor leak in mtree parser cleanup
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:30 2026 -->
@


1.20
log
@libarchive: updated to 3.8.5

3.8.5

Notable bugxies:

bsdtar: fix regression from 3.8.4 zero-length pattern issue bugfix
various small bugfixes in code and documentation
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:45 2026 -->
@


1.19
log
@libarchive: updated to 3.8.4

3.8.4

Notable bugxies:

bsdtar: Fix zero-length pattern issue
lib: Fix regression introduced in libarchive 3.8.2 when walking enterable but unreadable directories
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:39 2025 -->
@


1.18
log
@libarchive: updated to 3.8.3

Libarchive 3.8.3 is a bugfix and security release.

Security fixes:

lib: Create temporary files in the target directory
lha: Fix for an out-of-bounds buffer overrun when using p[H_LEVEL_OFFSET]
7-zip: Fix a buffer overrun when reading truncated 7zip headers

Notable bugxies:

lz4 and zstd: Support both lz4 and zstd data with leading skippable frames
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:03 2025 -->
@


1.17
log
@libarchive: updated to 3.8.2

Libarchive 3.8.2 is a bugfix and security release.

Security fixes:

7zip: Fix out of boundary access
tar reader: fix checking the result of the strftime

Notable bugfixes:

bsdtar: Allow filename to have CRLF endings
lib: archive_read_data: handle sparse holes at end of file correctly
lib: improve filter process handling
lib: fix error checking in writing files
lib: handle possible errors from system calls
lib: avoid leaking file descriptors into subprocesses
lib: parse_date: handle dates in 2038 and beyond if time_t is big enough
RAR5 reader: fix multiple issues in extra field parsing function
RAR5 reader: early fail when file declares data for a dir entry
tar writer: fix replacing a regular file with a dir for ARCHIVE_EXTRACT_SAFE_WRITES
tar reader (Windows): check WCS pathname in header_gnutar before overwriting
tar reader: fix an infinite loop when parsing V headers
zip writer: fix a memory leak if write callback error early
zip writer: fix writing with ZSTD compression
zstd write filter: enable Zstandard's checksum feature
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:47 2025 -->
@


1.16
log
@libarchive: updated to 3.8.1

3.8.1

Important bugfixes

various compilation fixes
fixed undefined behavior in a function in warc reader
Windows binary uses xz 5.2.5
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:41 2025 -->
@


1.15
log
@libarchive bsdtar: updated to 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:20 2025 -->
@


1.14
log
@bsdtar libarchive: updated to 3.7.9

3.7.9

Important bugfixes:

a regression in libarchive 3.7.8 regarding GNU sparse entries was fixed


3.7.8

Security fixes:

tar reader: Handle truncation in the middle of a GNU long linkname
unzip: fix null pointer dereference
tar reader: fix unchecked return value in list_item_verbose()

Important bugfixes:

7zip reader: add SPARC
tar reader: Ignore ustar size when pax size is present
tar writer: Fix bug when -s/a/b/ used more than once with b flag
cpio: Fix a Y2038 bug on Windows
libarchive: Handle ARCHIVE_FILTER_LZOP in archive_read_append_filter
libarchive: Adding missing seeker function to archive_read_open_FILE()
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
@


1.13
log
@libarchive: updated to 3.7.7

Libarchive 3.7.7 is a bugfix and security release

Security fixes:

gzip: prevent a hang when processing a malformed gzip inside a gzip
tar: don't crash on truncated tar archives
tar: fix two leaks in tar header parsing

Important bugfixes:

7-zip: read/write symlink paths as UTF-8
cpio: exit with an error code if an entry could not be extracted
rar5: report encrypted entries
tar: fix truncation of entry pathnames in specific archives
windows: fix ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS


Libarchive 3.7.6 is a bugfix and security release.
This release fixes a tar regression introduced in libarchive 3.7.5

Important bugfixes.

tar: clean up linkpath between entries
tar: fix memory leaks when processing symlinks or parsing pax headers
iso: be more cautious about parsing ISO-9660 timestamps
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Oct 13 08:12:11 2024 -->
@


1.12
log
@libarchive: updated to 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Fri Sep 13 20:31:07 2024 -->
d23 1
a23 1
<p>TAR(5) BSD File Formats Manual TAR(5)</p>
d27 2
a28 2
<p style="margin-left:6%;"><b>tar</b> &mdash; format of
tape archive files</p>
d32 1
a32 1
<p style="margin-left:6%;">The <b>tar</b> archive format
d40 2
a41 8
<p style="margin-left:6%; margin-top: 1em"><b>General
Format</b> <br>
A <b>tar</b> archive consists of a series of 512-byte
records. Each file system object requires a header record
which stores basic metadata (pathname, owner, permissions,
etc.) and zero or more records containing any file data. The
end of the archive is indicated by two records consisting
entirely of zero bytes.</p>
d43 9
a51 1
<p style="margin-left:6%; margin-top: 1em">For
d65 9
a73 8
<p style="margin-left:6%; margin-top: 1em"><b>Old-Style
Archive Format</b> <br>
The original tar archive format has been extended many times
to include additional information that various implementors
found necessary. This section describes the variant
implemented by the tar command included in Version&nbsp;7
AT&amp;T UNIX, which seems to be the earliest widely-used
version of the tar program.</p>
d75 1
a75 1
<p style="margin-left:6%; margin-top: 1em">The header
d79 1
a79 1
<p style="margin-left:14%; margin-top: 1em">struct
d85 2
a86 2
<td width="24%"></td>
<td width="11%">
d90 1
a90 1
<td width="65%">
d93 2
a94 2
<td width="24%"></td>
<td width="11%">
d98 1
a98 1
<td width="65%">
d101 2
a102 2
<td width="24%"></td>
<td width="11%">
d106 1
a106 1
<td width="65%">
d109 2
a110 2
<td width="24%"></td>
<td width="11%">
d114 1
a114 1
<td width="65%">
d117 2
a118 2
<td width="24%"></td>
<td width="11%">
d122 1
a122 1
<td width="65%">
d125 2
a126 2
<td width="24%"></td>
<td width="11%">
d130 1
a130 1
<td width="65%">
d133 2
a134 2
<td width="24%"></td>
<td width="11%">
d138 1
a138 1
<td width="65%">
d141 2
a142 2
<td width="24%"></td>
<td width="11%">
d146 1
a146 1
<td width="65%">
d149 2
a150 2
<td width="24%"></td>
<td width="11%">
d154 1
a154 1
<td width="65%">
d157 2
a158 2
<td width="24%"></td>
<td width="11%">
d162 1
a162 1
<td width="65%">
d166 1
a166 1
<p style="margin-left:14%;">};</p>
d168 1
a168 1
<p style="margin-left:6%;">All unused bytes in the header
d173 1
a173 1
<p style="margin-left:17%; margin-top: 1em">Pathname,
d183 1
a183 1
<p style="margin-left:17%; margin-top: 1em">File mode,
d188 1
a188 1
<p style="margin-left:17%;">User id and group id of owner,
d193 1
a193 1
<p style="margin-left:17%; margin-top: 1em">Size of file,
d202 1
a202 1
<p style="margin-left:17%; margin-top: 1em">Modification
d210 1
a210 1
<p style="margin-left:17%;">Header checksum, stored as an
d225 1
a225 1
<p style="margin-left:17%;">In order to preserve hardlinks
d229 1
a229 1
an ASCII &rsquo;1&rsquo; and the <i>linkname</i> field holds
d234 1
a234 1
<p style="margin-left:6%; margin-top: 1em">Early tar
d248 6
a253 5
<p style="margin-left:6%; margin-top: 1em"><b>Pre-POSIX
Archives</b> <br>
An early draft of IEEE Std 1003.1-1988
(&ldquo;POSIX.1&rdquo;) served as the basis for John
Gilmore&rsquo;s <b>pdtar</b> program and many system
d260 1
a260 1
<p style="margin-left:17%;">The magic value consists of the
d267 1
a267 1
<p style="margin-left:17%;">The numeric fields are
d273 1
a273 1
<p style="margin-left:17%;">The prefix field is often not
d277 7
a283 5
<p style="margin-left:6%; margin-top: 1em"><b>POSIX ustar
Archives</b> <br>
IEEE Std 1003.1-1988 (&ldquo;POSIX.1&rdquo;) defined a
standard tar file format to be read and written by compliant
implementations of tar(1). This format is often called the
d289 1
a289 1
<p style="margin-left:14%; margin-top: 1em">struct
d295 2
a296 2
<td width="24%"></td>
<td width="11%">
d300 1
a300 1
<td width="65%">
d303 2
a304 2
<td width="24%"></td>
<td width="11%">
d308 1
a308 1
<td width="65%">
d311 2
a312 2
<td width="24%"></td>
<td width="11%">
d316 1
a316 1
<td width="65%">
d319 2
a320 2
<td width="24%"></td>
<td width="11%">
d324 1
a324 1
<td width="65%">
d327 2
a328 2
<td width="24%"></td>
<td width="11%">
d332 1
a332 1
<td width="65%">
d335 2
a336 2
<td width="24%"></td>
<td width="11%">
d340 1
a340 1
<td width="65%">
d343 2
a344 2
<td width="24%"></td>
<td width="11%">
d348 1
a348 1
<td width="65%">
d351 2
a352 2
<td width="24%"></td>
<td width="11%">
d356 1
a356 1
<td width="65%">
d359 2
a360 2
<td width="24%"></td>
<td width="11%">
d364 1
a364 1
<td width="65%">
d367 2
a368 2
<td width="24%"></td>
<td width="11%">
d372 1
a372 1
<td width="65%">
d375 2
a376 2
<td width="24%"></td>
<td width="11%">
d380 1
a380 1
<td width="65%">
d383 2
a384 2
<td width="24%"></td>
<td width="11%">
d388 1
a388 1
<td width="65%">
d391 2
a392 2
<td width="24%"></td>
<td width="11%">
d396 1
a396 1
<td width="65%">
d399 2
a400 2
<td width="24%"></td>
<td width="11%">
d404 1
a404 1
<td width="65%">
d407 2
a408 2
<td width="24%"></td>
<td width="11%">
d412 1
a412 1
<td width="65%">
d415 2
a416 2
<td width="24%"></td>
<td width="11%">
d420 1
a420 1
<td width="65%">
d423 2
a424 2
<td width="24%"></td>
<td width="11%">
d428 1
a428 1
<td width="65%">
d432 1
a432 1
<p style="margin-left:14%;">};</p>
d436 1
a436 1
<p style="margin-left:17%;">Type of entry. POSIX extended
d442 1
a442 1
<p style="margin-left:27%; margin-top: 1em">Regular file.
d448 1
a448 1
<p style="margin-left:27%; margin-top: 1em">Hard link.</p>
d452 1
a452 1
<p style="margin-left:27%; margin-top: 1em">Symbolic
d457 1
a457 1
<p style="margin-left:27%; margin-top: 1em">Character
d462 1
a462 1
<p style="margin-left:27%; margin-top: 1em">Block device
d467 1
a467 1
<p style="margin-left:27%; margin-top: 1em">Directory.</p>
d471 1
a471 1
<p style="margin-left:27%; margin-top: 1em">FIFO node.</p>
d475 1
a475 1
<p style="margin-left:27%; margin-top: 1em">Reserved.</p>
d479 1
a479 1
<p style="margin-left:27%; margin-top: 1em">A
d489 1
a489 1
<p style="margin-left:17%;">It is worth noting that the
d500 1
a500 1
<p style="margin-left:17%; margin-top: 1em">Contains the
d508 1
a508 1
<p style="margin-left:17%;">Version. This should be
d514 1
a514 1
<p style="margin-left:17%;">User and group names, as
d522 1
a522 1
<p style="margin-left:17%;">Major and minor numbers for
d527 1
a527 1
<p style="margin-left:17%;">If the pathname is too long to
d538 1
a538 1
<p style="margin-left:6%; margin-top: 1em">Note that all
d541 1
a541 1
<p style="margin-left:6%; margin-top: 1em">Field
d553 1
a553 1
<p style="margin-left:6%; margin-top: 1em">Currently, most
d558 6
a563 5
<p style="margin-left:6%; margin-top: 1em"><b>Numeric
Extensions</b> <br>
There have been several attempts to extend the range of
sizes or times supported by modifying how numbers are stored
in the header.</p>
d565 1
a565 1
<p style="margin-left:6%; margin-top: 1em">One obvious
d573 1
a573 1
<p style="margin-left:6%; margin-top: 1em">Another
d589 1
a589 1
<p style="margin-left:6%; margin-top: 1em">Another early
d594 10
a603 9
<p style="margin-left:6%; margin-top: 1em"><b>Pax
Interchange Format</b> <br>
There are many attributes that cannot be portably stored in
a POSIX ustar archive. IEEE Std 1003.1-2001
(&ldquo;POSIX.1&rdquo;) defined a &ldquo;pax interchange
format&rdquo; that uses two new types of entries to hold
text-formatted metadata that applies to following entries.
Note that a pax interchange format archive is a ustar
archive in every respect. The new data is stored in
d610 1
a610 1
<p style="margin-left:6%; margin-top: 1em">An entry in a
d625 2
a626 1
<p style="margin-left:14%;">25 ctime=1084839148.1212\n</p>
d628 1
a628 1
<p style="margin-left:6%;">Keys in all lowercase are
d638 1
a638 1
<p style="margin-left:17%;">File access, inode change, and
d644 1
a644 1
<p style="margin-left:17%;">The character set used by the
d664 1
a664 1
<p style="margin-left:17%;">User name, group name, and
d672 1
a672 1
<p style="margin-left:17%;">The full path of the linked-to
d678 1
a678 1
<p style="margin-left:17%; margin-top: 1em">The full
d685 1
a685 1
<p style="margin-left:17%;">These keys are reserved and may
d690 1
a690 1
<p style="margin-left:17%; margin-top: 1em">The size of the
d697 1
a697 1
<p style="margin-left:17%;">Vendor-specific attributes used
d703 1
a703 1
<p style="margin-left:17%;">Stores the access, default and
d716 1
a716 1
<p style="margin-left:17%;">The full minor and major
d721 1
a721 1
<p style="margin-left:17%;">The file flags.</p>
d725 1
a725 1
<p style="margin-left:17%;">The full size of the file on
d731 1
a731 1
<p style="margin-left:17%;">The device number, inode
d739 1
a739 1
<p style="margin-left:17%;">Vendor-specific attributes used
d746 1
a746 1
<p style="margin-left:17%;">The time when the file was
d754 1
a754 1
<p style="margin-left:17%;">Libarchive stores
d765 1
a765 1
<p style="margin-left:17%;">XXX document other
d768 1
a768 1
<p style="margin-left:6%; margin-top: 1em">Any values
d782 1
a782 1
<p style="margin-left:6%; margin-top: 1em">In addition to
d789 1
a789 1
<p style="margin-left:6%; margin-top: 1em">Besides the new
d800 16
a815 14
<p style="margin-left:6%; margin-top: 1em"><b>GNU Tar
Archives</b> <br>
The GNU tar program started with a pre-POSIX format similar
to that described earlier and has extended it using several
different mechanisms: It added new fields to the empty space
in the header (some of which was later used by POSIX for
conflicting purposes); it allowed the header to be continued
over multiple records; and it defined new entries that
modify following entries (similar in principle to the
<b>x</b> entry described above, but each GNU special entry
is single-purpose, unlike the general-purpose <b>x</b>
entry). As a result, GNU tar archives are not POSIX
compatible, although more lenient POSIX-compliant readers
can successfully extract most GNU tar archives.</p>
d817 1
a817 1
<p style="margin-left:14%; margin-top: 1em">struct
d823 2
a824 2
<td width="24%"></td>
<td width="11%">
d829 1
a829 1
<td width="55%">
d832 2
a833 2
<td width="24%"></td>
<td width="11%">
d838 1
a838 1
<td width="55%">
d841 2
a842 2
<td width="24%"></td>
<td width="11%">
d847 1
a847 1
<td width="55%">
d850 2
a851 2
<td width="24%"></td>
<td width="11%">
d856 1
a856 1
<td width="55%">
d859 2
a860 2
<td width="24%"></td>
<td width="11%">
d865 1
a865 1
<td width="55%">
d868 2
a869 2
<td width="24%"></td>
<td width="11%">
d874 1
a874 1
<td width="55%">
d877 2
a878 2
<td width="24%"></td>
<td width="11%">
d883 1
a883 1
<td width="55%">
d886 2
a887 2
<td width="24%"></td>
<td width="11%">
d892 1
a892 1
<td width="55%">
d895 2
a896 2
<td width="24%"></td>
<td width="11%">
d901 1
a901 1
<td width="55%">
d904 2
a905 2
<td width="24%"></td>
<td width="11%">
d910 1
a910 1
<td width="55%">
d913 2
a914 2
<td width="24%"></td>
<td width="11%">
d919 1
a919 1
<td width="55%">
d922 2
a923 2
<td width="24%"></td>
<td width="11%">
d928 1
a928 1
<td width="55%">
d931 2
a932 2
<td width="24%"></td>
<td width="11%">
d937 1
a937 1
<td width="55%">
d940 2
a941 2
<td width="24%"></td>
<td width="11%">
d946 1
a946 1
<td width="55%">
d949 2
a950 2
<td width="24%"></td>
<td width="11%">
d955 1
a955 1
<td width="55%">
d958 2
a959 2
<td width="24%"></td>
<td width="11%">
d964 1
a964 1
<td width="55%">
d967 2
a968 2
<td width="24%"></td>
<td width="11%">
d973 1
a973 1
<td width="55%">
d976 2
a977 2
<td width="24%"></td>
<td width="11%">
d982 1
a982 1
<td width="55%">
d985 2
a986 2
<td width="24%"></td>
<td width="11%">
d991 1
a991 1
<td width="55%">
d994 2
a995 2
<td width="24%"></td>
<td width="11%">
d1000 1
a1000 1
<td width="55%">
d1003 2
a1004 2
<td width="24%"></td>
<td width="11%">
d1009 1
a1009 1
<td width="55%">
d1012 2
a1013 2
<td width="24%"></td>
<td width="11%">
d1019 1
a1019 1
<td width="55%">
d1022 2
a1023 2
<td width="24%"></td>
<td width="11%">
d1029 1
a1029 1
<td width="55%">
d1032 2
a1033 2
<td width="24%"></td>
<td width="11%">
d1038 1
a1038 1
<td width="55%">
d1041 2
a1042 2
<td width="24%"></td>
<td width="11%">
d1047 1
a1047 1
<td width="55%">
d1050 2
a1051 2
<td width="24%"></td>
<td width="11%">
d1056 1
a1056 1
<td width="55%">
d1059 2
a1060 2
<td width="24%"></td>
<td width="11%">
d1065 1
a1065 1
<td width="55%">
d1069 1
a1069 1
<p style="margin-left:14%;">};</p>
d1073 1
a1073 1
<p style="margin-left:17%;">GNU tar uses the following
d1079 1
a1079 1
<p style="margin-left:27%; margin-top: 1em">GNU tar treats
d1087 1
a1087 1
<p style="margin-left:27%; margin-top: 1em">This indicates
d1099 1
a1099 1
<p style="margin-left:27%; margin-top: 1em">Note that the
d1108 1
a1108 1
<p style="margin-left:27%; margin-top: 1em">The data for
d1114 1
a1114 1
<p style="margin-left:27%; margin-top: 1em">The data for
d1120 1
a1120 1
<p style="margin-left:27%; margin-top: 1em">This is a
d1141 1
a1141 1
<p style="margin-left:27%; margin-top: 1em">Type
d1154 1
a1154 1
<p style="margin-left:27%; margin-top: 1em">This is a
d1164 1
a1164 1
<p style="margin-left:27%; margin-top: 1em">The <i>name</i>
d1170 1
a1170 1
<p style="margin-left:17%; margin-top: 1em">The magic field
d1177 1
a1177 1
<p style="margin-left:17%;">The version field holds a space
d1183 1
a1183 1
<p style="margin-left:17%;">The time the file was last
d1189 1
a1189 1
<p style="margin-left:17%;">This field is apparently no
d1195 1
a1195 1
<p style="margin-left:17%;">Each such structure specifies a
d1205 1
a1205 1
<p style="margin-left:17%;">If this is set to non-zero, the
d1211 1
a1211 1
<p style="margin-left:24%; margin-top: 1em">struct
d1217 1
a1217 1
<td width="35%"></td>
d1222 2
a1223 2
<td width="10%"></td>
<td width="45%">
d1226 1
a1226 1
<td width="35%"></td>
d1229 1
a1229 1
<td width="10%">
d1233 1
a1233 1
<td width="45%">
d1236 1
a1236 1
<td width="35%"></td>
d1239 1
a1239 1
<td width="10%">
d1243 1
a1243 1
<td width="45%">
d1246 1
a1246 1
<td width="35%"></td>
d1251 2
a1252 2
<td width="10%"></td>
<td width="45%">
d1255 1
a1255 1
<td width="35%"></td>
d1260 2
a1261 2
<td width="10%"></td>
<td width="45%">
d1264 1
a1264 1
<td width="35%"></td>
d1269 2
a1270 2
<td width="10%"></td>
<td width="45%">
d1274 1
a1274 1
<p style="margin-left:24%;">};</p>
d1278 1
a1278 1
<p style="margin-left:17%;">A binary representation of the
d1286 11
a1296 10
<p style="margin-left:6%; margin-top: 1em"><b>GNU tar pax
archives</b> <br>
GNU tar 1.14 (XXX check this XXX) and later will write pax
interchange format archives when you specify the
<b>--posix</b> flag. This format follows the pax interchange
format closely, using some <b>SCHILY</b> tags and
introducing new keywords to store sparse file information.
There have been three iterations of the sparse file support,
referred to as &ldquo;0.0&rdquo;, &ldquo;0.1&rdquo;, and
&ldquo;1.0&rdquo;.</p>
d1302 1
a1302 1
<p style="margin-left:17%;">The &ldquo;0.0&rdquo; format
d1317 1
a1317 1
<p style="margin-left:17%;">The &ldquo;0.1&rdquo; format
d1329 1
a1329 1
<p style="margin-left:17%;">The &ldquo;1.0&rdquo; format
d1339 4
a1342 3
<p style="margin-left:6%; margin-top: 1em"><b>Solaris
Tar</b> <br>
XXX More Details Needed XXX</p>
d1344 1
a1344 1
<p style="margin-left:6%; margin-top: 1em">Solaris tar
d1352 1
a1352 1
<p style="margin-left:17%;">Extended attributes are stored
d1360 1
a1360 1
<p style="margin-left:17%;">An additional <b>A</b> header
d1368 2
a1369 3
<p style="margin-left:6%; margin-top: 1em"><b>AIX Tar</b>
<br>
XXX More details needed XXX</p>
d1371 3
a1373 1
<p style="margin-left:6%; margin-top: 1em">AIX Tar uses a
d1381 14
a1394 12
<p style="margin-left:6%; margin-top: 1em"><b>Mac OS X
Tar</b> <br>
The tar distributed with Apple&rsquo;s Mac OS X stores most
regular files as two separate files in the tar archive. The
two files have the same name except that the first one has
&ldquo;._&rdquo; prepended to the last path element. This
special file stores an AppleDouble-encoded binary blob with
additional metadata about the second file, including ACL,
extended attributes, and resources. To recreate the original
file on disk, each separate file can be extracted and the
Mac OS X <b>copyfile</b>() function can be used to unpack
the separate metadata file and apply it to th regular file.
d1400 1
a1400 1
<p style="margin-left:6%; margin-top: 1em">Note that the
d1407 8
a1414 6
<p style="margin-left:6%; margin-top: 1em"><b>Summary of
tar type codes</b> <br>
The following list is a condensed summary of the type codes
used in tar header records generated by different tar
implementations. More details about specific implementations
can be found above:</p>
d1418 1
a1418 1
<p style="margin-left:13%; margin-top: 1em">Early tar
d1423 1
a1423 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1428 1
a1428 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1433 1
a1433 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1438 1
a1438 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1443 1
a1443 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1448 1
a1448 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1453 1
a1453 1
<p style="margin-left:13%; margin-top: 1em">POSIX standard
d1458 1
a1458 1
<p style="margin-left:13%; margin-top: 1em">POSIX
d1463 1
a1463 1
<p style="margin-left:13%; margin-top: 1em">GNU tar used
d1468 1
a1468 1
<p style="margin-left:13%; margin-top: 1em">Solaris tar ACL
d1473 1
a1473 1
<p style="margin-left:13%; margin-top: 1em">AIX tar ACL
d1478 1
a1478 1
<p style="margin-left:13%; margin-top: 1em">GNU tar
d1483 1
a1483 1
<p style="margin-left:13%; margin-top: 1em">GNU tar long
d1488 1
a1488 1
<p style="margin-left:13%; margin-top: 1em">GNU tar long
d1493 1
a1493 1
<p style="margin-left:13%; margin-top: 1em">GNU tar
d1499 1
a1499 1
<p style="margin-left:13%; margin-top: 1em">GNU tar long
d1504 1
a1504 1
<p style="margin-left:13%; margin-top: 1em">GNU tar sparse
d1509 1
a1509 1
<p style="margin-left:13%; margin-top: 1em">GNU tar
d1514 1
a1514 1
<p style="margin-left:13%; margin-top: 1em">Solaris tar
d1519 1
a1519 1
<p style="margin-left:13%; margin-top: 1em">POSIX pax
d1524 1
a1524 1
<p style="margin-left:13%; margin-top: 1em">POSIX pax
d1529 2
a1530 1
<p style="margin-left:6%;">ar(1), pax(1), tar(1)</p>
d1534 1
a1534 1
<p style="margin-left:6%;">The <b>tar</b> utility is no
d1538 3
a1540 3
standards by pax(1). The ustar format is currently part of
the specification for the pax(1) utility. The pax
interchange file format is new with IEEE Std 1003.1-2001
d1545 1
a1545 1
<p style="margin-left:6%;">A <b>tar</b> command appeared in
d1557 1
a1557 1
<p style="margin-left:6%; margin-top: 1em">This
d1560 2
a1561 4
&lt;kientzle@@FreeBSD.org&gt;.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
December&nbsp;27, 2016 BSD</p>
@


1.11
log
@libarchive: updated to 3.7.4

Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:48 2024 -->
@


1.10
log
@libarchive: updated to 3.7.3

Libarchive 3.7.3 is a feature, security and bugfix release.

New features:

PCRE2 support
add trailing letter b to bsdtar(1) substitute pattern
add support for long options "--group" and "--owner" to tar(1)

Security fixes:

Fix possible vulnerability in tar error reporting introduced in f27c173

Important bugfixes:

ISO9660: preserve the natural order of links
rar5: fix decoding unicode filenames on Windows
rar5: fix infinite loop if during rar5 decompression the last block produced no data
xz filter: fix incorrect eof at the end of an lzip member
zip: fix end-of-data marker processing when decompressing zip archives
multiple bsdunzip(1) fixes
filetime truncation fix on Windows
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:28 2024 -->
@


1.9
log
@libarchive: updated to 3.7.2

Libarchive 3.7.2 is a security, bugfix and feature release.

Security fixes:

Multiple vulnerabilities have been fixed in the PAX writer (1b4e0d0)
Important bugfixes:

bsdunzip(1) now correctly handles arguments following an -x after the zipfile
New features:

bsdunzip(1) now supports the "--version" flag
7-zip reader now translates Windows permissions into UNIX permissions
uudecode filter in raw mode now supports file name and file mode
zstd filter now supports the "long" write option


Libarchive 3.7.1 is a security, feature and bugfix release.

Security fixes:

SEGV and stack buffer overflow in verbose mode of cpio
Feature updates:

bsdunzip updated to match latest upstream code
Important bugfixes:

miscellaneous functional bugfixes
build fixes on multiple platforms


Libarchive 3.7.0 is a feature and bugfix release.

New features:

bsdunzip: new tool ported from FreeBSD
drop-in replacement for Info-ZIP unzip, not yet ported for Windows
7zip reader: support for Zstandard compression
7zip reader: support for ARM64 filter
zstd filter: support for multi-frame zstd archives
Other notable bugfixes and improvements:

pax: fix year 2038 problem on platforms with 64-bit time_t
Windows: Universal Windows Platform (UWP) fixes and improvements
Windows: bcrypt usage fixes and improvements
Windows: time function usage fixes and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
@


1.8
log
@libarchive: Update to 3.4.3

Libarchive 3.4.3 is a feature and bugfix release.

New features:

    support for pzstd compressed files (#1357)
    support for RHT.security.selinux tar extended attribute (#1348)

Important bugfixes:

    various zstd fixes and improvements (#1342 #1352 #1359)
    child process handling fixes (#1372)

Libarchive 3.4.2 is a feature and security release.

New features:

    support for atomic file extraction (bsdtar -x --safe-writes) (#1289)
    support for mbed TLS (PolarSSL) (#1301)

Important bugfixes:

    security fixes in RAR5 reader (#1280 #1326)
    compression buffer fix in XAR writer (#1317)
    fix uname and gname longer than 32 characters in PAX writer (#1319)
    fix segfault when archiving hard links in ISO9660 and XAR writers (#1325)
    fix support for extracting 7z archive entries with Delta filter (#987)

Libarchive 3.4.1 is a feature and security release.

New features:

    Unicode filename support for reading lha/lzh archives
    New pax write option "xattrhdr"

Important bugfixes:

    security fixes in wide string processing (#1276 #1298)
    security fixes in RAR5 reader (#1212 #1217 #1296)
    security fixes and optimizations to write filter logic (#351)
    security fix related to use of readlink(2) (1dae5a5)
    sparse file handling fixes (#1218 #1260)

Thanks to all contributors and bug reporters.
Special thanks to Christos Zoulas (@@zoulasc) from NetBSD for the atomic file extraction feature.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Wed May 20 01:10:09 2020 -->
d53 2
a54 2
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
d58 4
a61 5
high-speed tape drives. (Note: the terms
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>
d241 3
a243 3
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>
d248 5
a252 5
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
described below with the following variations:</p>
d257 3
a259 3
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
by a space. The version field contains a space character
followed by a null.</p>
d275 7
a281 7
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>
d434 1
a434 1
<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>
d440 1
a440 1
<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>
d444 1
a444 1
<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>
d449 1
a449 1
<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>
d454 1
a454 1
<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>
d459 1
a459 1
<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>
d463 1
a463 1
<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>
d467 1
a467 1
<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>
d495 4
a498 4
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>
d503 2
a504 2
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>
d591 10
a600 11
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>
d641 10
a650 11
six-character ASCII string
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
are assumed to be in a platform-dependent multi-byte
encoding. Note that there are only two valid values for this
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
No other values are permitted by the standard, and the
latter value should generally not be used as it is the
default when this key is not specified. In particular, this
flag should not be used as a general mechanism to allow
filenames to be stored in arbitrary encodings.</p>
d739 2
a740 2
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
the time when the file metadata was last changed.)</p>
d748 5
a752 7
characters and the two special characters
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>
d1135 5
a1139 6
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
archives.</p>
d1144 6
a1149 7
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>
d1160 3
a1162 3
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>
d1168 1
a1168 2
use two copies of the ASCII digit
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>
d1195 4
a1198 4
header will be followed by additional &rsquo;&rsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>
d1283 2
a1284 3
referred to as &rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>
d1290 12
a1301 12
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
size of each block, and a single <b>GNU.sparse.size</b> to
indicate the full size of the file. This is not the same as
the size in the tar header because the latter value does not
include the size of any holes. This format required that the
order of attributes be preserved and relied on readers
accepting multiple appearances of the same attribute names,
which is not officially permitted by the standards.</p>
d1305 7
a1311 8
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
the archive is extracted by an archiver that does not
recognize this extension, since many pax implementations
simply discard unrecognized attributes.</p>
d1317 9
a1325 10
<p style="margin-left:17%;">The
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
<b>GNU.sparse.minor</b> fields) and the full size of the
file. The <b>GNU.sparse.name</b> holds the true name of the
file. To avoid confusion, the name stored in the regular tar
header is a modified name so that extraction errors will be
apparent to users.</p>
d1333 3
a1335 3
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>
d1372 11
a1382 11
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
element. This special file stores an AppleDouble-encoded
binary blob with additional metadata about the second file,
including ACL, extended attributes, and resources. To
recreate the original file on disk, each separate file can
be extracted and the Mac OS X <b>copyfile</b>() function can
be used to unpack the separate metadata file and apply it to
th regular file. Conversely, the same function provides a
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
extended metadata from a file into a separate file whose
contents can then be put into a tar archive.</p>
d1518 5
a1522 5
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
@


1.7
log
@Update for libarchive-3.4.0:
- improvements for Android APK and JAR archives
- better support for non-recursive list and extract
- tar --exclude-vcs support
- fixes for file attributes and flags handling
- zipx support
- rar 5.0 reader
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
d53 2
a54 2
&ldquo;blocks&rdquo; are always a multiple of the record
size. The maximum block size supported by early
d58 5
a62 4
high-speed tape drives. (Note: the terms &ldquo;block&rdquo;
and &ldquo;record&rdquo; here are not entirely standard;
this document follows the convention established by John
Gilmore in documenting <b>pdtar</b>.)</p>
d242 3
a244 3
(&ldquo;POSIX.1&rdquo;) standard was released. For best
portability, modern implementations should fill the numeric
fields with leading zeros.</p>
d249 5
a253 5
(&ldquo;POSIX.1&rdquo;) served as the basis for John
Gilmore&rsquo;s <b>pdtar</b> program and many system
implementations from the late 1980s and early 1990s. These
archives generally follow the POSIX ustar format described
below with the following variations:</p>
d258 3
a260 3
five characters &ldquo;ustar&rdquo; followed by a space. The
version field contains a space character followed by a
null.</p>
d276 7
a282 7
IEEE Std 1003.1-1988 (&ldquo;POSIX.1&rdquo;) defined a
standard tar file format to be read and written by compliant
implementations of tar(1). This format is often called the
&ldquo;ustar&rdquo; format, after the magic value used in
the header. (The name is an acronym for &ldquo;Unix Standard
TAR&rdquo;.) It extends the historic format with new
fields:</p>
d435 1
a435 1
<p>&ldquo;0&rdquo;</p>
d441 1
a441 1
<p>&ldquo;1&rdquo;</p>
d445 1
a445 1
<p>&ldquo;2&rdquo;</p>
d450 1
a450 1
<p>&ldquo;3&rdquo;</p>
d455 1
a455 1
<p>&ldquo;4&rdquo;</p>
d460 1
a460 1
<p>&ldquo;5&rdquo;</p>
d464 1
a464 1
<p>&ldquo;6&rdquo;</p>
d468 1
a468 1
<p>&ldquo;7&rdquo;</p>
d496 4
a499 4
magic value &ldquo;ustar&rdquo; followed by a NUL byte to
indicate that this is a POSIX standard archive. Full
compliance requires the uname and gname fields be properly
set.</p>
d504 2
a505 2
&ldquo;00&rdquo; (two copies of the ASCII digit zero) for
POSIX standard archives.</p>
d592 11
a602 10
(&ldquo;POSIX.1&rdquo;) defined a &ldquo;pax interchange
format&rdquo; that uses two new types of entries to hold
text-formatted metadata that applies to following entries.
Note that a pax interchange format archive is a ustar
archive in every respect. The new data is stored in
ustar-compatible archive entries that use the
&ldquo;x&rdquo; or &ldquo;g&rdquo; typeflag. In particular,
older implementations that do not fully support these
extensions will extract the metadata into regular files,
where the metadata can be examined as necessary.</p>
d643 11
a653 10
six-character ASCII string &ldquo;BINARY&rdquo;, then all
textual values are assumed to be in a platform-dependent
multi-byte encoding. Note that there are only two valid
values for this key: &ldquo;BINARY&rdquo; or
&ldquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rdquo;. No
other values are permitted by the standard, and the latter
value should generally not be used as it is the default when
this key is not specified. In particular, this flag should
not be used as a general mechanism to allow filenames to be
stored in arbitrary encodings.</p>
d695 1
a695 1
<b>SCHILY.acl.default, SCHILY.acl.ace</b></p>
d722 2
a723 2
<p style="margin-top: 1em"><b>SCHILY.dev, SCHILY.ino</b>,
<b>SCHILY.nlinks</b></p>
d742 2
a743 2
&ldquo;ctime&rdquo; attribute, which refers to the time when
the file metadata was last changed.)</p>
d746 1
a746 1
<p style="margin-top: 1em"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p>
d751 7
a757 5
characters and the two special characters &ldquo;=&rdquo;
and &ldquo;%&rdquo; are encoded as &ldquo;%&rdquo; followed
by two uppercase hexadecimal digits. The value of this key
is the extended attribute value encoded in base 64. XXX
Detail the base-64 format here XXX</p>
d1140 6
a1145 5
the operations to be done, in the form &ldquo;Rename %s to
%s\n&rdquo; or &ldquo;Symlink %s to %s\n&rdquo;; in either
case, both filenames are escaped using K&amp;R C syntax. Due
to security concerns, &quot;N&quot; records are now
generally ignored when reading archives.</p>
d1150 7
a1156 6
&ldquo;sparse&rdquo; regular file. Sparse files are stored
as a series of fragments. The header contains a list of
fragment offset/length pairs. If more than four such entries
are required, the header is extended as necessary with
&ldquo;extra&rdquo; header extensions (an older format that
is no longer used), or &ldquo;sparse&rdquo; extensions.</p>
d1167 3
a1169 3
holds the five characters &ldquo;ustar&rdquo; followed by a
space. Note that POSIX ustar archives have a trailing
null.</p>
d1175 2
a1176 1
use two copies of the ASCII digit &ldquo;0&rdquo;.</p>
d1203 4
a1206 4
header will be followed by additional &ldquo;sparse
header&rdquo; records. Each such record contains information
about as many as 21 additional sparse blocks as shown
here:</p>
d1291 3
a1293 2
referred to as &ldquo;0.0&rdquo;, &ldquo;0.1&rdquo;, and
&ldquo;1.0&rdquo;.</p>
d1299 12
a1310 12
<p style="margin-left:17%;">The &ldquo;0.0&rdquo; format
used an initial <b>GNU.sparse.numblocks</b> attribute to
indicate the number of blocks in the file, a pair of
<b>GNU.sparse.offset</b> and <b>GNU.sparse.numbytes</b> to
indicate the offset and size of each block, and a single
<b>GNU.sparse.size</b> to indicate the full size of the
file. This is not the same as the size in the tar header
because the latter value does not include the size of any
holes. This format required that the order of attributes be
preserved and relied on readers accepting multiple
appearances of the same attribute names, which is not
officially permitted by the standards.</p>
d1314 8
a1321 7
<p style="margin-left:17%;">The &ldquo;0.1&rdquo; format
used a single attribute that stored a comma-separated list
of decimal numbers. Each pair of numbers indicated the
offset and size, respectively, of a block of data. This does
not work well if the archive is extracted by an archiver
that does not recognize this extension, since many pax
implementations simply discard unrecognized attributes.</p>
d1327 10
a1336 9
<p style="margin-left:17%;">The &ldquo;1.0&rdquo; format
stores the sparse block map in one or more 512-byte blocks
prepended to the file data in the entry body. The pax
attributes indicate the existence of this map (via the
<b>GNU.sparse.major</b> and <b>GNU.sparse.minor</b> fields)
and the full size of the file. The <b>GNU.sparse.name</b>
holds the true name of the file. To avoid confusion, the
name stored in the regular tar header is a modified name so
that extraction errors will be apparent to users.</p>
d1344 3
a1346 3
&ldquo;extended&rdquo; format that is fundamentally similar
to pax interchange format, with the following
differences:</p>
d1383 11
a1393 11
&ldquo;._&rdquo; prepended to the last path element. This
special file stores an AppleDouble-encoded binary blob with
additional metadata about the second file, including ACL,
extended attributes, and resources. To recreate the original
file on disk, each separate file can be extracted and the
Mac OS X <b>copyfile</b>() function can be used to unpack
the separate metadata file and apply it to th regular file.
Conversely, the same function provides a &ldquo;pack&rdquo;
option to encode the extended metadata from a file into a
separate file whose contents can then be put into a tar
archive.</p>
d1529 5
a1533 5
(&ldquo;SUSv2&rdquo;). It has been supplanted in subsequent
standards by pax(1). The ustar format is currently part of
the specification for the pax(1) utility. The pax
interchange file format is new with IEEE Std 1003.1-2001
(&ldquo;POSIX.1&rdquo;).</p>
@


1.6
log
@libarchive: updated to 3.3.3

libarchive 3.3.3:
Avoid super-linear slowdown on malformed mtree files
Many fixes for building with Visual Studio
NO_OVERWRITE doesn't change existing directory attributes
New support for Zstandard read and write filters
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:10 2018 -->
d53 2
a54 2
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
d58 4
a61 5
high-speed tape drives. (Note: the terms
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>
d241 3
a243 3
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>
d248 5
a252 5
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
described below with the following variations:</p>
d257 3
a259 3
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
by a space. The version field contains a space character
followed by a null.</p>
d275 7
a281 7
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>
d434 1
a434 1
<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>
d440 1
a440 1
<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>
d444 1
a444 1
<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>
d449 1
a449 1
<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>
d454 1
a454 1
<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>
d459 1
a459 1
<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>
d463 1
a463 1
<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>
d467 1
a467 1
<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>
d495 4
a498 4
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>
d503 2
a504 2
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>
d591 10
a600 11
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>
d641 10
a650 11
six-character ASCII string
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
are assumed to be in a platform-dependent multi-byte
encoding. Note that there are only two valid values for this
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
No other values are permitted by the standard, and the
latter value should generally not be used as it is the
default when this key is not specified. In particular, this
flag should not be used as a general mechanism to allow
filenames to be stored in arbitrary encodings.</p>
d739 2
a740 2
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
the time when the file metadata was last changed.)</p>
d748 5
a752 7
characters and the two special characters
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>
d1135 5
a1139 6
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
archives.</p>
d1144 6
a1149 7
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>
d1160 3
a1162 3
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>
d1168 1
a1168 2
use two copies of the ASCII digit
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>
d1195 4
a1198 4
header will be followed by additional &rsquo;&rsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>
d1283 2
a1284 3
referred to as &rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>
d1290 12
a1301 12
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
size of each block, and a single <b>GNU.sparse.size</b> to
indicate the full size of the file. This is not the same as
the size in the tar header because the latter value does not
include the size of any holes. This format required that the
order of attributes be preserved and relied on readers
accepting multiple appearances of the same attribute names,
which is not officially permitted by the standards.</p>
d1305 7
a1311 8
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
the archive is extracted by an archiver that does not
recognize this extension, since many pax implementations
simply discard unrecognized attributes.</p>
d1317 9
a1325 10
<p style="margin-left:17%;">The
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
<b>GNU.sparse.minor</b> fields) and the full size of the
file. The <b>GNU.sparse.name</b> holds the true name of the
file. To avoid confusion, the name stored in the regular tar
header is a modified name so that extraction errors will be
apparent to users.</p>
d1333 3
a1335 3
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>
d1372 11
a1382 11
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
element. This special file stores an AppleDouble-encoded
binary blob with additional metadata about the second file,
including ACL, extended attributes, and resources. To
recreate the original file on disk, each separate file can
be extracted and the Mac OS X <b>copyfile</b>() function can
be used to unpack the separate metadata file and apply it to
th regular file. Conversely, the same function provides a
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
extended metadata from a file into a separate file whose
contents can then be put into a tar archive.</p>
d1518 5
a1522 5
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
@


1.5
log
@Merge for libarchive-3.3.2.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:58 2017 -->
@


1.4
log
@Merge libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:08 2017 -->
d53 1
a53 1
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
d59 2
a60 2
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
d227 1
a227 1
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
d242 1
a242 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
d249 1
a249 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
d258 1
a258 1
five characters &lsquo;&lsquo;ustar&rsquo;&rsquo; followed
d276 1
a276 1
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
d279 1
a279 1
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
d281 1
a281 1
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
d435 1
a435 1
<p>&lsquo;&lsquo;0&rsquo;&rsquo;</p>
d441 1
a441 1
<p>&lsquo;&lsquo;1&rsquo;&rsquo;</p>
d445 1
a445 1
<p>&lsquo;&lsquo;2&rsquo;&rsquo;</p>
d450 1
a450 1
<p>&lsquo;&lsquo;3&rsquo;&rsquo;</p>
d455 1
a455 1
<p>&lsquo;&lsquo;4&rsquo;&rsquo;</p>
d460 1
a460 1
<p>&lsquo;&lsquo;5&rsquo;&rsquo;</p>
d464 1
a464 1
<p>&lsquo;&lsquo;6&rsquo;&rsquo;</p>
d468 1
a468 1
<p>&lsquo;&lsquo;7&rsquo;&rsquo;</p>
d496 1
a496 1
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
d504 1
a504 1
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
d592 2
a593 2
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
d598 2
a599 2
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
d644 1
a644 1
&lsquo;&lsquo;BINARY&rsquo;&rsquo;, then all textual values
d647 2
a648 2
key: &lsquo;&lsquo;BINARY&rsquo;&rsquo; or
&lsquo;&lsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
d742 1
a742 1
&lsquo;&lsquo;ctime&rsquo;&rsquo; attribute, which refers to
d752 3
a754 3
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
d1140 2
a1141 2
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
d1150 1
a1150 1
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
d1154 1
a1154 1
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
d1156 1
a1156 1
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>
d1167 1
a1167 1
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
d1176 1
a1176 1
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>
d1203 1
a1203 1
header will be followed by additional &lsquo;&lsquo;sparse
d1287 7
a1293 8
<b>&minus;-posix</b> flag. This format follows the pax
interchange format closely, using some <b>SCHILY</b> tags
and introducing new keywords to store sparse file
information. There have been three iterations of the sparse
file support, referred to as
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>
d1300 1
a1300 1
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
d1315 1
a1315 1
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
d1328 1
a1328 1
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
d1344 1
a1344 1
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
d1383 1
a1383 1
&lsquo;&lsquo;._&rsquo;&rsquo; prepended to the last path
d1391 1
a1391 1
&lsquo;&lsquo;pack&rsquo;&rsquo; option to encode the
d1529 1
a1529 1
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
d1533 1
a1533 1
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>
@


1.3
log
@Update for libarchive 3.2.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
d53 1
a53 1
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
d59 2
a60 2
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
d227 1
a227 1
an ASCII &rsquo;1&rsquo; and the <i>linkname</i> field holds
d242 1
a242 1
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
d249 1
a249 1
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
d258 1
a258 1
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
d276 1
a276 1
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
d279 1
a279 1
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
d281 1
a281 1
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
d435 1
a435 1
<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>
d441 1
a441 1
<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>
d445 1
a445 1
<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>
d450 1
a450 1
<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>
d455 1
a455 1
<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>
d460 1
a460 1
<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>
d464 1
a464 1
<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>
d468 1
a468 1
<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>
d496 1
a496 1
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
d504 1
a504 1
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
d592 2
a593 2
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
d598 2
a599 2
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
d644 1
a644 1
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
d647 2
a648 2
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
d695 1
a695 1
<b>SCHILY.acl.default</b></p>
d697 9
a705 8
<p style="margin-left:17%;">Stores the access and default
ACLs as textual strings in a format that is an extension of
the format specified by POSIX.1e draft 17. In particular,
each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID. This
allows ACLs to be restored on systems that may not have
complete user or group information available (such as when
NIS/YP or LDAP services are temporarily unavailable).</p>
d742 1
a742 1
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
d752 3
a754 3
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
d1140 2
a1141 2
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
d1150 1
a1150 1
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
d1154 1
a1154 1
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
d1156 1
a1156 1
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>
d1167 1
a1167 1
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
d1176 1
a1176 1
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>
d1203 1
a1203 1
header will be followed by additional &rsquo;&rsquo;sparse
d1292 3
a1294 3
&rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>
d1301 1
a1301 1
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
d1316 1
a1316 1
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
d1329 1
a1329 1
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
d1345 1
a1345 1
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
d1384 1
a1384 1
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
d1392 1
a1392 1
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
d1530 1
a1530 1
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
d1534 1
a1534 1
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
d1556 1
a1556 1
December&nbsp;23, 2011 BSD</p>
@


1.2
log
@Changes 3.1.2:
This is a maintenance update to fix issues with the new RAR seeking
feature. This new release also contains fixes for build failures when
building libarchive using Visual Studio 2012 and MinGW.
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.21 -->
<!-- CreationDate: Sat Feb  9 12:24:08 2013 -->
d1545 1
a1545 1
another open-source (GPL) archiver (originally developed
d1551 2
a1552 2
and <b>bsdtar</b> project by Tim Kientzle &lang;
kientzle@@FreeBSD.org&rang; .</p>
@


1.1
log
@Initial revision
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Thu Feb  4 20:36:38 2010 -->
d11 4
a14 3
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
d23 1
a23 2
<p valign="top">tar(5) FreeBSD File Formats Manual
tar(5)</p>
d25 1
a25 1
<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
d27 1
a27 1
<p style="margin-left:8%;"><b>tar</b> &mdash; format of
d30 1
d32 1
a32 3
<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>tar</b> archive format
d40 1
a40 1
<p style="margin-left:8%; margin-top: 1em"><b>General
d49 1
a49 1
<p style="margin-left:8%; margin-top: 1em">For
d53 1
a53 1
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
d59 2
a60 2
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
d64 1
a64 1
<p style="margin-left:8%; margin-top: 1em"><b>Old-Style
d73 1
a73 1
<p style="margin-left:8%; margin-top: 1em">The header
d77 1
a77 1
<p style="margin-left:17%; margin-top: 1em">struct
d80 1
a80 1
<table width="100%" border=0 rules="none" frame="void"
d83 2
a84 2
<td width="29%"></td>
<td width="13%">
d87 3
a89 3
<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
d91 2
a92 2
<td width="29%"></td>
<td width="13%">
d95 3
a97 3
<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
d99 2
a100 2
<td width="29%"></td>
<td width="13%">
d103 3
a105 3
<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
d107 2
a108 2
<td width="29%"></td>
<td width="13%">
d111 3
a113 3
<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
d115 2
a116 2
<td width="29%"></td>
<td width="13%">
d119 3
a121 3
<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
d123 2
a124 2
<td width="29%"></td>
<td width="13%">
d127 3
a129 3
<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
d131 2
a132 2
<td width="29%"></td>
<td width="13%">
d135 3
a137 3
<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
d139 2
a140 2
<td width="29%"></td>
<td width="13%">
d143 3
a145 3
<p valign="top">char linkflag[1];</p></td>
<td width="58%">
</td>
d147 2
a148 2
<td width="29%"></td>
<td width="13%">
d151 3
a153 3
<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
d155 2
a156 2
<td width="29%"></td>
<td width="13%">
d159 3
a161 3
<p valign="top">char pad[255];</p></td>
<td width="58%">
</td>
d164 1
a164 1
<p style="margin-left:17%;">};</p>
d166 1
a166 1
<p style="margin-left:8%;">All unused bytes in the header
d169 1
a169 1
<p style="margin-top: 1em" valign="top"><i>name</i></p>
d171 1
a171 1
<p style="margin-left:20%; margin-top: 1em">Pathname,
d179 1
a179 1
<p style="margin-top: 1em" valign="top"><i>mode</i></p>
d181 1
a181 1
<p style="margin-left:20%; margin-top: 1em">File mode,
d184 1
a184 2
<p style="margin-top: 1em" valign="top"><i>uid</i>,
<i>gid</i></p>
d186 1
a186 1
<p style="margin-left:20%;">User id and group id of owner,
d189 1
a189 1
<p style="margin-top: 1em" valign="top"><i>size</i></p>
d191 1
a191 1
<p style="margin-left:20%; margin-top: 1em">Size of file,
d198 1
a198 1
<p style="margin-top: 1em" valign="top"><i>mtime</i></p>
d200 1
a200 1
<p style="margin-left:20%; margin-top: 1em">Modification
d206 1
d208 1
a208 3
<p style="margin-top: 1em" valign="top"><i>checksum</i></p>

<p style="margin-left:20%;">Header checksum, stored as an
d220 1
a220 1
<p style="margin-top: 1em" valign="top"><i>linkflag</i>,
d223 1
a223 1
<p style="margin-left:20%;">In order to preserve hardlinks
d227 1
a227 1
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
d232 1
a232 1
<p style="margin-left:8%; margin-top: 1em">Early tar
d242 1
a242 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
d246 1
a246 1
<p style="margin-left:8%; margin-top: 1em"><b>Pre-POSIX
d249 1
a249 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
d255 1
a255 1
<p valign="top"><b>&bull;</b></p>
d257 3
a259 3
<p style="margin-left:20%;">The magic value is
&lsquo;&lsquo;ustar&nbsp;&rsquo;&rsquo; (note the following
space). The version field contains a space character
d262 1
a262 1
<p valign="top"><b>&bull;</b></p>
d264 1
a264 1
<p style="margin-left:20%;">The numeric fields are
d268 1
a268 1
<p valign="top"><b>&bull;</b></p>
d270 1
a270 1
<p style="margin-left:20%;">The prefix field is often not
d274 1
a274 1
<p style="margin-left:8%; margin-top: 1em"><b>POSIX ustar
d276 1
a276 1
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
d279 1
a279 1
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
d281 1
a281 1
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
d284 1
a284 1
<p style="margin-left:17%; margin-top: 1em">struct
d287 1
a287 1
<table width="100%" border=0 rules="none" frame="void"
d290 2
a291 2
<td width="29%"></td>
<td width="13%">
d294 3
a296 3
<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
d298 2
a299 2
<td width="29%"></td>
<td width="13%">
d302 3
a304 3
<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
d306 2
a307 2
<td width="29%"></td>
<td width="13%">
d310 3
a312 3
<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
d314 2
a315 2
<td width="29%"></td>
<td width="13%">
d318 3
a320 3
<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
d322 2
a323 2
<td width="29%"></td>
<td width="13%">
d326 3
a328 3
<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
d330 2
a331 2
<td width="29%"></td>
<td width="13%">
d334 3
a336 3
<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
d338 2
a339 2
<td width="29%"></td>
<td width="13%">
d342 3
a344 3
<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
d346 2
a347 2
<td width="29%"></td>
<td width="13%">
d350 3
a352 3
<p valign="top">char typeflag[1];</p></td>
<td width="58%">
</td>
d354 2
a355 2
<td width="29%"></td>
<td width="13%">
d358 3
a360 3
<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
d362 2
a363 2
<td width="29%"></td>
<td width="13%">
d366 3
a368 3
<p valign="top">char magic[6];</p></td>
<td width="58%">
</td>
d370 2
a371 2
<td width="29%"></td>
<td width="13%">
d374 3
a376 3
<p valign="top">char version[2];</p></td>
<td width="58%">
</td>
d378 2
a379 2
<td width="29%"></td>
<td width="13%">
d382 3
a384 3
<p valign="top">char uname[32];</p></td>
<td width="58%">
</td>
d386 2
a387 2
<td width="29%"></td>
<td width="13%">
d390 3
a392 3
<p valign="top">char gname[32];</p></td>
<td width="58%">
</td>
d394 2
a395 2
<td width="29%"></td>
<td width="13%">
d398 3
a400 3
<p valign="top">char devmajor[8];</p></td>
<td width="58%">
</td>
d402 2
a403 2
<td width="29%"></td>
<td width="13%">
d406 3
a408 3
<p valign="top">char devminor[8];</p></td>
<td width="58%">
</td>
d410 2
a411 2
<td width="29%"></td>
<td width="13%">
d414 3
a416 3
<p valign="top">char prefix[155];</p></td>
<td width="58%">
</td>
d418 2
a419 2
<td width="29%"></td>
<td width="13%">
d422 3
a424 3
<p valign="top">char pad[12];</p></td>
<td width="58%">
</td>
d427 1
a427 1
<p style="margin-left:17%;">};</p>
d429 1
d431 1
a431 3
<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">Type of entry. POSIX extended
d435 1
a435 1
<p valign="top">&lsquo;&lsquo;0&rsquo;&rsquo;</p>
d437 1
a437 1
<p style="margin-left:32%; margin-top: 1em">Regular file.
d441 1
a441 1
<p valign="top">&lsquo;&lsquo;1&rsquo;&rsquo;</p>
d443 1
a443 1
<p style="margin-left:32%; margin-top: 1em">Hard link.</p>
d445 1
a445 1
<p valign="top">&lsquo;&lsquo;2&rsquo;&rsquo;</p>
d447 1
a447 1
<p style="margin-left:32%; margin-top: 1em">Symbolic
d450 1
a450 1
<p valign="top">&lsquo;&lsquo;3&rsquo;&rsquo;</p>
d452 1
a452 1
<p style="margin-left:32%; margin-top: 1em">Character
d455 1
a455 1
<p valign="top">&lsquo;&lsquo;4&rsquo;&rsquo;</p>
d457 1
a457 1
<p style="margin-left:32%; margin-top: 1em">Block device
d460 1
a460 1
<p valign="top">&lsquo;&lsquo;5&rsquo;&rsquo;</p>
d462 1
a462 1
<p style="margin-left:32%; margin-top: 1em">Directory.</p>
d464 1
a464 1
<p valign="top">&lsquo;&lsquo;6&rsquo;&rsquo;</p>
d466 1
a466 1
<p style="margin-left:32%; margin-top: 1em">FIFO node.</p>
d468 1
a468 1
<p valign="top">&lsquo;&lsquo;7&rsquo;&rsquo;</p>
d470 1
a470 1
<p style="margin-left:32%; margin-top: 1em">Reserved.</p>
d472 1
a472 1
<p valign="top">Other</p>
d474 1
a474 1
<p style="margin-left:32%; margin-top: 1em">A
d484 1
a484 1
<p style="margin-left:20%;">It is worth noting that the
d493 1
a493 1
<p style="margin-top: 1em" valign="top"><i>magic</i></p>
d495 2
a496 2
<p style="margin-left:20%; margin-top: 1em">Contains the
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
d501 1
a501 1
<p style="margin-top: 1em" valign="top"><i>version</i></p>
d503 2
a504 2
<p style="margin-left:20%;">Version. This should be
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
d507 1
a507 2
<p style="margin-top: 1em" valign="top"><i>uname</i>,
<i>gname</i></p>
d509 1
a509 1
<p style="margin-left:20%;">User and group names, as
d514 1
a514 1
<p style="margin-top: 1em" valign="top"><i>devmajor</i>,
d517 1
a517 1
<p style="margin-left:20%;">Major and minor numbers for
d520 1
a520 2
<p style="margin-top: 1em" valign="top"><i>name</i>,
<i>prefix</i></p>
d522 1
a522 1
<p style="margin-left:20%;">If the pathname is too long to
d533 1
a533 1
<p style="margin-left:8%; margin-top: 1em">Note that all
d536 1
a536 1
<p style="margin-left:8%; margin-top: 1em">Field
d548 1
a548 1
<p style="margin-left:8%; margin-top: 1em">Currently, most
d553 36
a588 1
<p style="margin-left:8%; margin-top: 1em"><b>Pax
d592 2
a593 2
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
d598 2
a599 2
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
d604 1
a604 1
<p style="margin-left:8%; margin-top: 1em">An entry in a
d619 1
a619 1
<p style="margin-left:17%;">25 ctime=1084839148.1212\n</p>
d621 1
a621 1
<p style="margin-left:8%;">Keys in all lowercase are
d628 2
a629 2
<p style="margin-top: 1em" valign="top"><b>atime</b>,
<b>ctime</b>, <b>mtime</b></p>
d631 1
a631 1
<p style="margin-left:20%;">File access, inode change, and
d635 19
a653 2
<p style="margin-top: 1em" valign="top"><b>uname</b>,
<b>uid</b>, <b>gname</b>, <b>gid</b></p>
d655 4
a658 1
<p style="margin-left:20%;">User name, group name, and
d664 1
d666 1
a666 3
<p style="margin-top: 1em" valign="top"><b>linkpath</b></p>

<p style="margin-left:20%;">The full path of the linked-to
d670 1
a670 1
<p style="margin-top: 1em" valign="top"><b>path</b></p>
d672 1
a672 1
<p style="margin-left:20%; margin-top: 1em">The full
d676 1
a676 1
<p style="margin-top: 1em" valign="top"><b>realtime.*</b>,
d679 1
a679 1
<p style="margin-left:20%;">These keys are reserved and may
d682 1
a682 1
<p style="margin-top: 1em" valign="top"><b>size</b></p>
d684 1
a684 1
<p style="margin-left:20%; margin-top: 1em">The size of the
d689 1
d691 1
a691 3
<p style="margin-top: 1em" valign="top"><b>SCHILY.*</b></p>

<p style="margin-left:20%;">Vendor-specific attributes used
d694 1
a694 2

<p style="margin-top: 1em" valign="top"><b>SCHILY.acl.access</b>,
d697 1
a697 1
<p style="margin-left:20%;">Stores the access and default
d706 1
a706 2

<p style="margin-top: 1em" valign="top"><b>SCHILY.devminor</b>,
d709 1
a709 1
<p style="margin-left:20%;">The full minor and major
d712 1
d714 1
a714 1
<p style="margin-top: 1em" valign="top"><b>SCHILY.fflags</b></p>
d716 1
a716 1
<p style="margin-left:20%;">The file flags.</p>
d718 1
a718 4

<p style="margin-top: 1em" valign="top"><b>SCHILY.realsize</b></p>

<p style="margin-left:20%;">The full size of the file on
d721 2
a722 2
<p style="margin-top: 1em" valign="top"><b>SCHILY.dev,
SCHILY.ino</b>, <b>SCHILY.nlinks</b></p>
d724 1
a724 1
<p style="margin-left:20%;">The device number, inode
d730 8
d739 4
a742 1
<p style="margin-top: 1em" valign="top"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p>
d744 4
a747 1
<p style="margin-left:20%;">Libarchive stores
d751 3
a753 3
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
d758 1
d760 1
a760 3
<p style="margin-top: 1em" valign="top"><b>VENDOR.*</b></p>

<p style="margin-left:20%;">XXX document other
d763 1
a763 1
<p style="margin-left:8%; margin-top: 1em">Any values
d777 1
a777 1
<p style="margin-left:8%; margin-top: 1em">In addition to
d784 1
a784 1
<p style="margin-left:8%; margin-top: 1em">Besides the new
d795 1
a795 1
<p style="margin-left:8%; margin-top: 1em"><b>GNU Tar
d810 1
a810 1
<p style="margin-left:17%; margin-top: 1em">struct
d813 1
a813 1
<table width="100%" border=0 rules="none" frame="void"
d816 2
a817 2
<td width="29%"></td>
<td width="13%">
d820 4
a823 4
<p valign="top">char name[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d825 2
a826 2
<td width="29%"></td>
<td width="13%">
d829 4
a832 4
<p valign="top">char mode[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d834 2
a835 2
<td width="29%"></td>
<td width="13%">
d838 4
a841 4
<p valign="top">char uid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d843 2
a844 2
<td width="29%"></td>
<td width="13%">
d847 4
a850 4
<p valign="top">char gid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d852 2
a853 2
<td width="29%"></td>
<td width="13%">
d856 4
a859 4
<p valign="top">char size[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d861 2
a862 2
<td width="29%"></td>
<td width="13%">
d865 4
a868 4
<p valign="top">char mtime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d870 2
a871 2
<td width="29%"></td>
<td width="13%">
d874 4
a877 4
<p valign="top">char checksum[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d879 2
a880 2
<td width="29%"></td>
<td width="13%">
d883 4
a886 4
<p valign="top">char typeflag[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d888 2
a889 2
<td width="29%"></td>
<td width="13%">
d892 4
a895 4
<p valign="top">char linkname[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d897 2
a898 2
<td width="29%"></td>
<td width="13%">
d901 4
a904 4
<p valign="top">char magic[6];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d906 2
a907 2
<td width="29%"></td>
<td width="13%">
d910 4
a913 4
<p valign="top">char version[2];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d915 2
a916 2
<td width="29%"></td>
<td width="13%">
d919 4
a922 4
<p valign="top">char uname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d924 2
a925 2
<td width="29%"></td>
<td width="13%">
d928 4
a931 4
<p valign="top">char gname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d933 2
a934 2
<td width="29%"></td>
<td width="13%">
d937 4
a940 4
<p valign="top">char devmajor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d942 2
a943 2
<td width="29%"></td>
<td width="13%">
d946 4
a949 4
<p valign="top">char devminor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d951 2
a952 2
<td width="29%"></td>
<td width="13%">
d955 4
a958 4
<p valign="top">char atime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d960 2
a961 2
<td width="29%"></td>
<td width="13%">
d964 4
a967 4
<p valign="top">char ctime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d969 2
a970 2
<td width="29%"></td>
<td width="13%">
d973 4
a976 4
<p valign="top">char offset[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d978 2
a979 2
<td width="29%"></td>
<td width="13%">
d982 4
a985 4
<p valign="top">char longnames[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d987 2
a988 2
<td width="29%"></td>
<td width="13%">
d991 4
a994 4
<p valign="top">char unused[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d996 2
a997 2
<td width="29%"></td>
<td width="13%">
d1000 4
a1003 4
<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d1005 2
a1006 2
<td width="29%"></td>
<td width="13%">
d1008 1
a1008 1
<td width="12%">
d1011 3
a1013 3
<p valign="top">char offset[12];</p></td>
<td width="46%">
</td>
d1015 2
a1016 2
<td width="29%"></td>
<td width="13%">
d1018 1
a1018 1
<td width="12%">
d1021 3
a1023 3
<p valign="top">char numbytes[12];</p></td>
<td width="46%">
</td>
d1025 2
a1026 2
<td width="29%"></td>
<td width="13%">
d1029 4
a1032 4
<p valign="top">} sparse[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d1034 2
a1035 2
<td width="29%"></td>
<td width="13%">
d1038 4
a1041 4
<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d1043 2
a1044 2
<td width="29%"></td>
<td width="13%">
d1047 4
a1050 4
<p valign="top">char realsize[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d1052 2
a1053 2
<td width="29%"></td>
<td width="13%">
d1056 4
a1059 4
<p valign="top">char pad[17];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
d1062 1
a1062 1
<p style="margin-left:17%;">};</p>
d1064 1
d1066 1
a1066 3
<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">GNU tar uses the following
d1070 1
a1070 1
<p style="margin-top: 1em" valign="top">7</p>
d1072 1
a1072 1
<p style="margin-left:32%; margin-top: 1em">GNU tar treats
d1078 1
a1078 1
<p style="margin-top: 1em" valign="top">D</p>
d1080 1
a1080 1
<p style="margin-left:32%; margin-top: 1em">This indicates
d1092 1
a1092 1
<p style="margin-left:32%; margin-top: 1em">Note that the
d1099 1
a1099 1
<p style="margin-top: 1em" valign="top">K</p>
d1101 1
a1101 1
<p style="margin-left:32%; margin-top: 1em">The data for
d1105 1
a1105 1
<p style="margin-top: 1em" valign="top">L</p>
d1107 1
a1107 1
<p style="margin-left:32%; margin-top: 1em">The data for
d1111 1
a1111 1
<p style="margin-top: 1em" valign="top">M</p>
d1113 1
a1113 1
<p style="margin-left:32%; margin-top: 1em">This is a
d1132 1
a1132 1
<p style="margin-top: 1em" valign="top">N</p>
d1134 1
a1134 1
<p style="margin-left:32%; margin-top: 1em">Type
d1139 2
a1140 2
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
d1146 1
a1146 1
<p style="margin-top: 1em" valign="top">S</p>
d1148 2
a1149 2
<p style="margin-left:32%; margin-top: 1em">This is a
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
d1153 1
a1153 1
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
d1155 1
a1155 1
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>
d1157 1
a1157 1
<p style="margin-top: 1em" valign="top">V</p>
d1159 1
a1159 1
<p style="margin-left:32%; margin-top: 1em">The <i>name</i>
d1163 1
a1163 1
<p style="margin-top: 1em" valign="top"><i>magic</i></p>
d1165 2
a1166 2
<p style="margin-left:20%; margin-top: 1em">The magic field
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
d1170 1
a1170 1
<p style="margin-top: 1em" valign="top"><i>version</i></p>
d1172 1
a1172 1
<p style="margin-left:20%;">The version field holds a space
d1175 1
a1175 1
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>
d1177 1
a1177 2
<p style="margin-top: 1em" valign="top"><i>atime</i>,
<i>ctime</i></p>
d1179 1
a1179 1
<p style="margin-left:20%;">The time the file was last
d1183 1
d1185 1
a1185 3
<p style="margin-top: 1em" valign="top"><i>longnames</i></p>

<p style="margin-left:20%;">This field is apparently no
d1188 1
a1188 1
<p style="margin-top: 1em" valign="top">Sparse <i>offset /
d1191 1
a1191 1
<p style="margin-left:20%;">Each such structure specifies a
d1199 1
d1201 2
a1202 4
<p style="margin-top: 1em" valign="top"><i>isextended</i></p>

<p style="margin-left:20%;">If this is set to non-zero, the
header will be followed by additional &lsquo;&lsquo;sparse
d1207 1
a1207 1
<p style="margin-left:29%; margin-top: 1em">struct
d1210 1
a1210 1
<table width="100%" border=0 rules="none" frame="void"
d1213 2
a1214 2
<td width="42%"></td>
<td width="12%">
d1217 4
a1220 4
<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="34%">
</td>
d1222 2
a1223 2
<td width="42%"></td>
<td width="12%">
d1225 1
a1225 1
<td width="12%">
d1228 3
a1230 3
<p valign="top">char offset[12];</p></td>
<td width="34%">
</td>
d1232 2
a1233 2
<td width="42%"></td>
<td width="12%">
d1235 1
a1235 1
<td width="12%">
d1238 3
a1240 3
<p valign="top">char numbytes[12];</p></td>
<td width="34%">
</td>
d1242 2
a1243 2
<td width="42%"></td>
<td width="12%">
d1246 4
a1249 4
<p valign="top">} sparse[21];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
d1251 2
a1252 2
<td width="42%"></td>
<td width="12%">
d1255 4
a1258 4
<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
d1260 2
a1261 2
<td width="42%"></td>
<td width="12%">
d1264 4
a1267 4
<p valign="top">char padding[7];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
d1270 1
a1270 1
<p style="margin-left:29%;">};</p>
d1272 1
d1274 1
a1274 3
<p style="margin-top: 1em" valign="top"><i>realsize</i></p>

<p style="margin-left:20%;">A binary representation of the
d1282 1
a1282 1
<p style="margin-left:8%; margin-top: 1em"><b>GNU tar pax
d1286 8
a1293 7
<b>&minus;-posix</b> flag. This format uses custom keywords
to store sparse file information. There have been three
iterations of this support, referred to as
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>

d1295 1
a1295 1
<p style="margin-top: 1em" valign="top"><b>GNU.sparse.numblocks</b>,
d1299 2
a1300 2
<p style="margin-left:20%;">The
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
d1312 1
d1314 2
a1315 4
<p style="margin-top: 1em" valign="top"><b>GNU.sparse.map</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
d1323 1
a1323 2

<p style="margin-top: 1em" valign="top"><b>GNU.sparse.major</b>,
d1327 2
a1328 2
<p style="margin-left:20%;">The
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
d1338 1
a1338 1
<p style="margin-left:8%; margin-top: 1em"><b>Solaris
d1342 1
a1342 1
<p style="margin-left:8%; margin-top: 1em">Solaris tar
d1344 1
a1344 1
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
d1348 1
a1348 1
<p valign="top"><b>&bull;</b></p>
d1350 1
a1350 1
<p style="margin-left:20%;">Extended attributes are stored
d1356 1
a1356 1
<p valign="top"><b>&bull;</b></p>
d1358 2
a1359 2
<p style="margin-left:20%;">An additional <b>A</b> entry is
used to store an ACL for the following regular entry. The
d1366 1
a1366 1
<p style="margin-left:8%; margin-top: 1em"><b>AIX Tar</b>
d1370 9
a1378 1
<p style="margin-left:8%; margin-top: 1em"><b>Mac OS X
d1381 59
a1439 9
regular files as two separate entries in the tar archive.
The two entries have the same name except that the first one
has &lsquo;&lsquo;._&rsquo;&rsquo; added to the beginning of
the name. This first entry stores the &lsquo;&lsquo;resource
fork&rsquo;&rsquo; with additional attributes for the file.
The Mac OS X <b>CopyFile</b>() API is used to separate a
file on disk into separate resource and data streams and to
reassemble those separate streams when the file is restored
to disk.</p>
d1441 70
a1510 8
<p style="margin-left:8%; margin-top: 1em"><b>Other
Extensions</b> <br>
One obvious extension to increase the size of files is to
eliminate the terminating characters from the various
numeric fields. For example, the standard only allows the
size field to contain 11 octal digits, reserving the twelfth
byte for a trailing NUL character. Allowing 12 octal digits
allows file sizes up to 64 GB.</p>
d1512 2
a1513 12
<p style="margin-left:8%; margin-top: 1em">Another
extension, utilized by GNU tar, star, and other newer
<b>tar</b> implementations, permits binary numbers in the
standard numeric fields. This is flagged by setting the high
bit of the first byte. This permits 95-bit values for the
length and time fields and 63-bit values for the uid, gid,
and device numbers. GNU tar supports this extension for the
length, mtime, ctime, and atime fields. Joerg
Schilling&rsquo;s star program supports this extension for
all numeric fields. Note that this extension is largely
obsoleted by the extended attribute record provided by the
pax interchange format.</p>
d1515 1
a1515 4
<p style="margin-left:8%; margin-top: 1em">Another early
GNU extension allowed base-64 values rather than octal. This
extension was short-lived and is no longer supported by any
implementation.</p>
d1517 2
a1518 1
<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>
d1520 1
a1520 1
<p style="margin-left:8%;">ar(1), pax(1), tar(1)</p>
d1522 1
d1524 1
a1524 1
<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>
d1526 1
a1526 1
<p style="margin-left:8%;">The <b>tar</b> utility is no
d1529 1
a1529 1
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
d1533 1
a1533 1
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>
d1535 1
a1535 1
<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>
d1537 1
a1537 1
<p style="margin-left:8%;">A <b>tar</b> command appeared in
d1549 1
a1549 1
<p style="margin-left:8%; margin-top: 1em">This
d1551 2
a1552 3
and <b>bsdtar</b> project by Tim Kientzle
&lang;kientzle@@FreeBSD.org&rang;.</p>

d1554 2
a1555 2
<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;8.0
December&nbsp;27, 2009 FreeBSD&nbsp;8.0</p>
@


1.1.1.1
log
@Import libarchive 2.8.0:
- Infrastructure:
  - Allow command line tools as fallback for missing compression
    libraries. If compiled without gzip for example, gunzip will
    be used automatically.
  - Improved support for a number of platforms like high-resolution
    timestamps and Extended Attributes on various Unix systems
  - New convience interface for creating archives based on disk content,
    complement of the archive_write_disk interface.
- Frontends:
  - bsdcpio ready for public consumption
  - hand-written date parser replaces the yacc code
- Filter system:
  - Simplified read filter chains
  - Option support for filters
  - LZMA, XZ, uudecode handled
- Format support:
  - Write support for mtree files based on file system or archive
    content
  - Basic read support for Joliet
  - Write support for zip files
  - Write support for shar archives, both text-only and binary-safe
@
text
@@


1.1.1.2
log
@libarchive-2.8.2:
- Fix NULL deference for short self-extracting zip archives
- Don't dereference symlinks on Linux when reading ACLs
- Better detection of SHA2 support for old OpenSSL versions
- Fix parsing of input files for bsdtar -T
- Do not leak setup_xattr into the global namespace
- Fix build when an older libarchive is already installed
- Use O_BINARY opening files in bsdtar
- Include missing archive_crc32.h
- Correctly include iconv.h required by libxml2
@
text
@d1 1400
a1400 1657
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Sun Mar 14 02:49:17 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 146
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(December 27, 2009 tar 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>tar</b>)0 48 Q 2.5(-f)0 60 S
(ormat of tape archi)-2.5 E .3 -.15(ve \214)-.25 H(les).15 E
(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q
(<b>tar</b>)0 48 Q(archi)0 60 Q .3 -.15(ve f)-.25 H(ormat collects an)
.15 E 2.5(yn)-.15 G(umber of \214les, directories, and other)-2.5 E
(\214le system objects \(symbolic links, de)0 72 Q
(vice nodes, etc.\) into a single)-.25 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(stream of bytes.)0 12 Q(The format w)0 24 Q
(as originally designed to be used with)-.1 E(tape dri)0 36 Q -.15(ve)
-.25 G 2.5(st).15 G(hat operate with \214x)-2.5 E(ed-size blocks, b)-.15
E(ut is widely used as)-.2 E 2.5(ag)0 48 S(eneral packaging mechanism.)
-2.5 E(<h4 id="General F)36 60 Q(ormat">)-.15 E(General F)36 72 Q(ormat)
-.15 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(A)0 24 Q(<b>tar</b>)0 36 Q(archi)0
48 Q .3 -.15(ve c)-.25 H(onsists of a series of 512-byte records.).15 E
(Each \214le system object requires a header record which stores basic \
metadata)0 60 Q(\(pathname, o)0 72 Q(wner)-.25 E 2.5(,p)-.4 G
(ermissions, etc.\) and zero or more records containing an)-2.5 E(y)-.15
E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214le data.)0 12 Q(The end of the archi)0 24 Q
.3 -.15(ve i)-.25 H 2.5(si).15 G(ndicated by tw)-2.5 E 2.5(or)-.1 G
(ecords consisting)-2.5 E(entirely of zero bytes.)0 36 Q(<p>)36 48 Q
-.15(Fo)0 60 S 2.5(rc).15 G(ompatibility with tape dri)-2.5 E -.15(ve)
-.25 G 2.5(st).15 G(hat use \214x)-2.5 E(ed block sizes,)-.15 E
(programs that read or write tar \214les al)0 72 Q -.1(wa)-.1 G
(ys read or write a \214x).1 E(ed)-.15 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(number of records with each I/O operation.)0 12
Q(These)0 24 Q -.74(``)0 36 S(blocks').74 E(')-.74 E(are al)0 48 Q -.1
(wa)-.1 G(ys a multiple of the record size.).1 E
(The maximum block size supported by early)0 60 Q(implementations w)0 72
Q(as 10240 bytes or 20 records.)-.1 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This is still the def)0 12 Q
(ault for most implementations)-.1 E
(although block sizes of 1MiB \(2048 records\) or lar)0 24 Q(ger are)
-.18 E(commonly used with modern high-speed tape dri)0 36 Q -.15(ve)-.25
G(s.).15 E(\(Note: the terms)0 48 Q -.74(``)0 60 S(block').74 E(')-.74 E
(and)0 72 Q 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(record').74 E(')-.74 E
(here are not entirely standard; this document follo)0 24 Q(ws the)-.25
E(con)0 36 Q -.15(ve)-.4 G
(ntion established by John Gilmore in documenting).15 E(<b>pdtar</b>.\))
0 48 Q(<h4 id="Old-Style Archi)36 60 Q .3 -.15(ve Fo)-.25 H(rmat">).15 E
(Old-Style Archi)36 72 Q .3 -.15(ve Fo)-.25 H(rmat).15 E 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(The original tar archi)0 24 Q .3
-.15(ve f)-.25 H(ormat has been e).15 E(xtended man)-.15 E 2.5(yt)-.15 G
(imes to)-2.5 E(include additional information that v)0 36 Q
(arious implementors found)-.25 E(necessary)0 48 Q(.)-.65 E
(This section describes the v)0 60 Q
(ariant implemented by the tar command)-.25 E(included in)0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)0 12 S(rsion 7 <code>A)1.11 E
(T&T UNIX</code>,)-1.11 E(which seems to be the earliest widely-used v)0
24 Q(ersion of the tar program.)-.15 E(<p>)36 36 Q
(The header record for an old-style)0 48 Q(<b>tar</b>)0 60 Q(archi)0 72
Q .3 -.15(ve c)-.25 H(onsists of the follo).15 E(wing:)-.25 E 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>)
0 36 Q(struct header_old_tar {)0 48 Q(char name[100];)36 60 Q
(char mode[8];)36 72 Q 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uid[8];)36 12 Q(char gid[8];)36 24 Q
(char size[12];)36 36 Q(char mtime[12];)36 48 Q(char checksum[8];)36 60
Q(char link\215ag[1];)36 72 Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char linkname[100];)36 12 Q(char pad[255];)36 24
Q(};)0 36 Q(</pre>)0 48 Q(</code>)0 60 Q(</dl>)0 72 Q 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(All unused bytes in the header record are \214lled with nulls.)0 12 Q
(<dl compact>)0 24 Q(<p><dt><i></i><i>name</i><dd>)0 36 Q -.15(Pa)0 48 S
(thname, stored as a null-terminated string.).15 E
(Early tar implementations only stored re)0 60 Q
(gular \214les \(including)-.15 E(hardlinks to those \214les\).)0 72 Q 0
Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(One common early con)0 12 Q -.15(ve)-.4 G
(ntion used a trailing "/" character to indicate).15 E 2.5(ad)0 24 S
(irectory name, allo)-2.5 E(wing directory permissions and o)-.25 E
(wner information)-.25 E(to be archi)0 36 Q -.15(ve)-.25 G 2.5(da).15 G
(nd restored.)-2.5 E(<p><dt><i></i><i>mode</i><dd>)0 48 Q
(File mode, stored as an octal number in ASCII.)0 60 Q
(<p><dt><i></i><i>uid</i><i></i>,<i> gid</i><dd>)0 72 Q 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(User id and group id of o)0 12 Q(wner)-.25 E 2.5
(,a)-.4 G 2.5(so)-2.5 G(ctal numbers in ASCII.)-2.5 E
(<p><dt><i></i><i>size</i><dd>)0 24 Q
(Size of \214le, as octal number in ASCII.)0 36 Q -.15(Fo)0 48 S 2.5(rr)
.15 G -.15(eg)-2.5 G(ular \214les only).15 E 2.5(,t)-.65 G
(his indicates the amount of data)-2.5 E(that follo)0 60 Q
(ws the header)-.25 E(.)-.55 E(In particular)0 72 Q 2.5(,t)-.4 G
(his \214eld w)-2.5 E(as ignored by early tar implementations)-.1 E 0 Cg
EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when e)0 12 Q(xtracting hardlinks.)-.15 E
(Modern writers should al)0 24 Q -.1(wa)-.1 G
(ys store a zero length for hardlink entries.).1 E
(<p><dt><i></i><i>mtime</i><dd>)0 36 Q
(Modi\214cation time of \214le, as an octal number in ASCII.)0 48 Q
(This indicates the number of seconds since the start of the epoch,)0 60
Q(00:00:00 UTC January 1, 1970.)0 72 Q 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Note that ne)0 12 Q -.05(ga)-.15 G(ti).05 E .3
-.15(ve v)-.25 H(alues should be a)-.1 E -.2(vo)-.2 G(ided).2 E
(here, as the)0 24 Q 2.5(ya)-.15 G(re handled inconsistently)-2.5 E(.)
-.65 E(<p><dt><i></i><i>checksum</i><dd>)0 36 Q
(Header checksum, stored as an octal number in ASCII.)0 48 Q 1.6 -.8
(To c)0 60 T
(ompute the checksum, set the checksum \214eld to all spaces,).8 E
(then sum all bytes in the header using unsigned arithmetic.)0 72 Q 0 Cg
EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(This \214eld should be stored as six octal digits follo)0 12 Q
(wed by a null and a space)-.25 E(character)0 24 Q(.)-.55 E
(Note that man)0 36 Q 2.5(ye)-.15 G
(arly implementations of tar used signed arithmetic)-2.5 E
(for the checksum \214eld, which can cause interoperability problems)0
48 Q(when transferring archi)0 60 Q -.15(ve)-.25 G 2.5(sb).15 G
(etween systems.)-2.5 E(Modern rob)0 72 Q
(ust readers compute the checksum both w)-.2 E(ays and accept the)-.1 E
0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(header if either computation matches.)0 12 Q
(<p><dt><i></i><i>link\215ag</i><i></i>,<i> linkname</i><dd>)0 24 Q
(In order to preserv)0 36 Q 2.5(eh)-.15 G(ardlinks and conserv)-2.5 E
2.5(et)-.15 G(ape, a \214le)-2.5 E
(with multiple links is only written to the archi)0 48 Q .3 -.15(ve t)
-.25 H(he \214rst).15 E(time it is encountered.)0 60 Q(The ne)0 72 Q
(xt time it is encountered, the)-.15 E 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<i></i><i>link\215ag</i>)0 12 Q
(is set to an ASCII)0 24 Q(`1')0 36 Q(and the)0 48 Q
(<i></i><i>linkname</i>)0 60 Q
(\214eld holds the \214rst name under which this \214le appears.)0 72 Q
0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(Note that re)0 12 Q(gular \214les ha)-.15 E .3
-.15(ve a n)-.2 H(ull v).15 E(alue in the)-.25 E
(<i></i><i>link\215ag</i>)0 24 Q(\214eld.\))0 36 Q(</dl>)0 48 Q(<p>)36
60 Q(Early tar implementations v)0 72 Q(aried in ho)-.25 E 2.5(wt)-.25 G
(he)-2.5 E 2.5(yt)-.15 G(erminated these \214elds.)-2.5 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The tar command in)0 12 Q -1.11(Ve)0 24 S
(rsion 7 <code>A)1.11 E(T&T UNIX</code>)-1.11 E(used the follo)0 36 Q
(wing con)-.25 E -.15(ve)-.4 G
(ntions \(this is also documented in early BSD manpages\):).15 E
(the pathname must be null-terminated;)0 48 Q
(the mode, uid, and gid \214elds must end in a space and a null byte;)0
60 Q(the size and mtime \214elds must end in a space;)0 72 Q 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(the checksum is terminated by a null and a space.)0 12 Q(Early impleme\
ntations \214lled the numeric \214elds with leading spaces.)0 24 Q
(This seems to ha)0 36 Q .3 -.15(ve b)-.2 H
(een common practice until the).15 E(IEEE Std 1003.1-1988 \(`)2.5 48 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(standard w)0 60 Q
(as released.)-.1 E -.15(Fo)0 72 S 2.5(rb).15 G(est portability)-2.5 E
2.5(,m)-.65 G(odern implementations should \214ll the numeric)-2.5 E 0
Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214elds with leading zeros.)0 12 Q
(<h4 id="Pre-POSIX Archi)36 24 Q -.15(ve)-.25 G(s">).15 E
(Pre-POSIX Archi)36 36 Q -.15(ve)-.25 G(s).15 E(</h4>)36 48 Q
(An early draft of)0 60 Q(IEEE Std 1003.1-1988 \(`)2.5 72 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E 0 Cg EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(serv)0 12 Q(ed as the basis for John Gilmore')
-.15 E(s)-.55 E(<b>pdtar</b>)0 24 Q(program and man)0 36 Q 2.5(ys)-.15 G
(ystem implementations from the late 1980s)-2.5 E(and early 1990s.)0 48
Q(These archi)0 60 Q -.15(ve)-.25 G 2.5(sg).15 G(enerally follo)-2.5 E
2.5(wt)-.25 G(he POSIX ustar)-2.5 E(format described belo)0 72 Q 2.5(ww)
-.25 G(ith the follo)-2.5 E(wing v)-.25 E(ariations:)-.25 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<ul>)0 12 Q(<li>)0 24 Q(The magic v)0 36 Q
(alue is)-.25 E -.74(``)0 48 S(ustar ').74 E(')-.74 E(\(note the follo)0
60 Q(wing space\).)-.25 E(The v)0 72 Q
(ersion \214eld contains a space character follo)-.15 E(wed by a null.)
-.25 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q
(The numeric \214elds are generally \214lled with leading spaces)0 24 Q
(\(not leading zeros as recommended in the \214nal standard\).)0 36 Q
(<li>)0 48 Q
(The pre\214x \214eld is often not used, limiting pathnames to)0 60 Q
(the 100 characters of old-style archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0
Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q(<h4 id="POSIX ustar Archi)36 24 Q
-.15(ve)-.25 G(s">).15 E(POSIX ustar Archi)36 36 Q -.15(ve)-.25 G(s).15
E(</h4>)36 48 Q(IEEE Std 1003.1-1988 \(`)2.5 60 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E
(de\214ned a standard tar \214le format to be read and written)0 72 Q 0
Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(by compliant implementations of)0 12 Q
(<a href="../html1/tar)0 24 Q(.html">tar\(1\)</a>.)-.55 E
(This format is often called the)0 36 Q -.74(``)0 48 S(ustar').74 E(')
-.74 E(format, after the magic v)0 60 Q(alue used)-.25 E(in the header)0
72 Q(.)-.55 E 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(The name is an acron)0 12 Q(ym for)-.15 E -.74
(``)0 24 S(Unix Standard T).74 E(AR')-.93 E('.\))-.74 E(It e)0 36 Q
(xtends the historic format with ne)-.15 E 2.5<778c>-.25 G(elds:)-2.5 E
(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(struct header_posix_ustar {)0 12 Q
(char name[100];)36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q
(char gid[8];)36 60 Q(char size[12];)36 72 Q 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24
Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q
(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q
(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E
(char pre\214x[155];)36 60 Q(char pad[12];)36 72 Q 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(};)0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0
48 Q(<dl compact>)0 60 Q(<p><dt><i></i><i>type\215ag</i><dd>)0 72 Q 0 Cg
EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.8(Ty)0 12 S(pe of entry).8 E(.)-.65 E(POSIX e)
0 24 Q(xtended the earlier)-.15 E(<i></i><i>link\215ag</i>)0 36 Q
(\214eld with se)0 48 Q -.15(ve)-.25 G(ral ne).15 E 2.5(wt)-.25 G(ype v)
-2.5 E(alues:)-.25 E(<dl compact>)0 60 Q(<dt>`)0 72 Q(`0')-.74 E('<dd>)
-.74 E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Re)0 12 Q(gular \214le.)-.15 E
(NUL should be treated as a synon)0 24 Q
(ym, for compatibility purposes.)-.15 E(<dt>`)0 36 Q(`1')-.74 E('<dd>)
-.74 E(Hard link.)0 48 Q(<dt>`)0 60 Q(`2')-.74 E('<dd>)-.74 E
(Symbolic link.)0 72 Q 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dt>`)0 12 Q(`3')-.74 E('<dd>)-.74 E
(Character de)0 24 Q(vice node.)-.25 E(<dt>`)0 36 Q(`4')-.74 E('<dd>)
-.74 E(Block de)0 48 Q(vice node.)-.25 E(<dt>`)0 60 Q(`5')-.74 E('<dd>)
-.74 E(Directory)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dt>`)0 12 Q(`6')-.74 E('<dd>)-.74 E(FIFO node.)
0 24 Q(<dt>`)0 36 Q(`7')-.74 E('<dd>)-.74 E(Reserv)0 48 Q(ed.)-.15 E
(<dt>Other<dd>)0 60 Q 2.5(AP)0 72 S
(OSIX-compliant implementation must treat an)-2.5 E 2.5(yu)-.15 G
(nrecognized type\215ag v)-2.5 E(alue)-.25 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(as a re)0 12 Q(gular \214le.)-.15 E
(In particular)0 24 Q 2.5(,w)-.4 G
(riters should ensure that all entries)-2.5 E(ha)0 36 Q .3 -.15(ve a v)
-.2 H(alid \214lename so that the)-.1 E 2.5(yc)-.15 G
(an be restored by readers that do not)-2.5 E
(support the corresponding e)0 48 Q(xtension.)-.15 E
(Uppercase letters "A" through "Z" are reserv)0 60 Q(ed for custom e)
-.15 E(xtensions.)-.15 E(Note that sock)0 72 Q
(ets and whiteout entries are not archi)-.1 E -.25(va)-.25 G(ble.).25 E
0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</dl>)0 12 Q(It is w)0 24 Q
(orth noting that the)-.1 E(<i></i><i>size</i>)0 36 Q
(\214eld, in particular)0 48 Q 2.5(,h)-.4 G(as dif)-2.5 E
(ferent meanings depending on the type.)-.25 E -.15(Fo)0 60 S 2.5(rr).15
G -.15(eg)-2.5 G
(ular \214les, of course, it indicates the amount of data).15 E(follo)0
72 Q(wing the header)-.25 E(.)-.55 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(Fo)0 12 S 2.5(rd).15 G
(irectories, it may be used to indicate the total size of all)-2.5 E
(\214les in the directory)0 24 Q 2.5(,f)-.65 G
(or use by operating systems that pre-allocate)-2.5 E(directory space.)0
36 Q -.15(Fo)0 48 S 2.5(ra).15 G
(ll other types, it should be set to zero by writers and ignored)-2.5 E
(by readers.)0 60 Q(<p><dt><i></i><i>magic</i><dd>)0 72 Q 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Contains the magic v)0 12 Q(alue)-.25 E -.74(``)
0 24 S(ustar').74 E(')-.74 E(follo)0 36 Q
(wed by a NUL byte to indicate that this is a POSIX standard archi)-.25
E -.15(ve)-.25 G(.).15 E
(Full compliance requires the uname and gname \214elds be properly set.)
0 48 Q(<p><dt><i></i><i>v)0 60 Q(ersion</i><dd>)-.15 E -1.11(Ve)0 72 S
(rsion.)1.11 E 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This should be)0 12 Q -.74(``)0 24 S(00').74 E
(')-.74 E(\(tw)0 36 Q 2.5(oc)-.1 G
(opies of the ASCII digit zero\) for POSIX standard archi)-2.5 E -.15
(ve)-.25 G(s.).15 E(<p><dt><i></i><i>uname</i><i></i>,<i> gname</i><dd>)
0 48 Q(User and group names, as null-terminated ASCII strings.)0 60 Q
(These should be used in preference to the uid/gid v)0 72 Q(alues)-.25 E
0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when the)0 12 Q 2.5(ya)-.15 G
(re set and the corresponding names e)-2.5 E(xist on)-.15 E(the system.)
0 24 Q(<p><dt><i></i><i>de)0 36 Q(vmajor</i><i></i>,<i> de)-.25 E
(vminor</i><dd>)-.25 E(Major and minor numbers for character de)0 48 Q
(vice or block de)-.25 E(vice entry)-.25 E(.)-.65 E
(<p><dt><i></i><i>name</i><i></i>,<i> pre\214x</i><dd>)0 60 Q
(If the pathname is too long to \214t in the 100 bytes pro)0 72 Q
(vided by the standard)-.15 E 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(format, it can be split at an)0 12 Q(y)-.15 E
(<code></code><code>/</code>)0 24 Q
(character with the \214rst portion going into the pre\214x \214eld.)0
36 Q(If the pre\214x \214eld is not empty)0 48 Q 2.5(,t)-.65 G
(he reader will prepend)-2.5 E(the pre\214x v)0 60 Q(alue and a)-.25 E
(<code></code><code>/</code>)0 72 Q 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(character to the re)0 12 Q
(gular name \214eld to obtain the full pathname.)-.15 E
(The standard does not require a trailing)0 24 Q
(<code></code><code>/</code>)0 36 Q
(character on directory names, though most implementations still)0 48 Q
(include this for compatibility reasons.)0 60 Q(</dl>)0 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q
(Note that all unused bytes must be set to)0 24 Q
(<code></code><code>NUL</code>.)0 36 Q(<p>)36 48 Q
(Field termination is speci\214ed slightly dif)0 60 Q(ferently by POSIX)
-.25 E(than by pre)0 72 Q(vious implementations.)-.25 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<i></i><i>magic</i>,)0 24 Q
(<i></i><i>uname</i>,)0 36 Q(and)0 48 Q(<i></i><i>gname</i>)0 60 Q
(\214elds must ha)0 72 Q .3 -.15(ve a t)-.2 H(railing).15 E 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>NUL</code>.)0 12 Q(The)0 24 Q
(<i></i><i>pathname</i>,)0 36 Q(<i></i><i>linkname</i>,)0 48 Q(and)0 60
Q(<i></i><i>pre\214x</i>)0 72 Q 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214elds must ha)0 12 Q .3 -.15(ve a t)-.2 H
(railing).15 E(<code></code><code>NUL</code>)0 24 Q(unless the)0 36 Q
2.5<798c>-.15 G(ll the entire \214eld.)-2.5 E(\(In particular)0 48 Q 2.5
(,i)-.4 G 2.5(ti)-2.5 G 2.5(sp)-2.5 G
(ossible to store a 256-character pathname if it)-2.5 E(happens to ha)0
60 Q .3 -.15(ve a)-.2 H(<code></code><code>/</code>)0 72 Q 0 Cg EP
%%Page: 55 55
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(as the 156th character)0 12 Q(.\))-.55 E(POSIX \
requires numeric \214elds to be zero-padded in the front, and requires)0
24 Q(them to be terminated with either space or)0 36 Q
(<code></code><code>NUL</code>)0 48 Q(characters.)0 60 Q(<p>)36 72 Q 0
Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Currently)0 12 Q 2.5(,m)-.65 G
(ost tar implementations comply with the ustar)-2.5 E
(format, occasionally e)0 24 Q(xtending it by adding ne)-.15 E 2.5<778c>
-.25 G(elds to the)-2.5 E(blank area at the end of the header record.)0
36 Q(<h4 id="P)36 48 Q(ax Interchange F)-.15 E(ormat">)-.15 E -.15(Pa)36
60 S 2.5(xI).15 G(nterchange F)-2.5 E(ormat)-.15 E(</h4>)36 72 Q 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are man)0 12 Q 2.5(ya)-.15 G(ttrib)-2.5 E
(utes that cannot be portably stored in a)-.2 E(POSIX ustar archi)0 24 Q
-.15(ve)-.25 G(.).15 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(de\214ned a)0 48 Q
-.74(``)0 60 S(pax interchange format').74 E(')-.74 E(that uses tw)0 72
Q 2.5(on)-.1 G .5 -.25(ew t)-2.5 H(ypes of entries to hold te).25 E
(xt-formatted)-.15 E 0 Cg EP
%%Page: 58 58
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(metadata that applies to follo)0 12 Q
(wing entries.)-.25 E(Note that a pax interchange format archi)0 24 Q .3
-.15(ve i)-.25 H 2.5(sau).15 G(star archi)-2.5 E .3 -.15(ve i)-.25 H 2.5
(ne).15 G -.15(ve)-2.75 G(ry).15 E(respect.)0 36 Q(The ne)0 48 Q 2.5(wd)
-.25 G(ata is stored in ustar)-2.5 E(-compatible archi)-.2 E .3 -.15
(ve e)-.25 H(ntries that use the).15 E -.74(``)0 60 S(x').74 E(')-.74 E
(or)0 72 Q 0 Cg EP
%%Page: 59 59
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(g').74 E(')-.74 E(type\215ag.)0
24 Q(In particular)0 36 Q 2.5(,o)-.4 G
(lder implementations that do not fully support these)-2.5 E -.15(ex)0
48 S(tensions will e).15 E(xtract the metadata into re)-.15 E
(gular \214les, where the)-.15 E(metadata can be e)0 60 Q
(xamined as necessary)-.15 E(.)-.65 E(<p>)36 72 Q 0 Cg EP
%%Page: 60 60
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An entry in a pax interchange format archi)0 12
Q .3 -.15(ve c)-.25 H(onsists of one or).15 E(tw)0 24 Q 2.5(os)-.1 G
(tandard ustar entries, each with its o)-2.5 E(wn header and data.)-.25
E(The \214rst optional entry stores the e)0 36 Q(xtended attrib)-.15 E
(utes)-.2 E(for the follo)0 48 Q(wing entry)-.25 E(.)-.65 E(This option\
al \214rst entry has an "x" type\215ag and a size \214eld that)0 60 Q
(indicates the total size of the e)0 72 Q(xtended attrib)-.15 E(utes.)
-.2 E 0 Cg EP
%%Page: 61 61
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The e)0 12 Q(xtended attrib)-.15 E
(utes themselv)-.2 E(es are stored as a series of te)-.15 E(xt-format)
-.15 E(lines encoded in the portable UTF-8 encoding.)0 24 Q
(Each line consists of a decimal number)0 36 Q 2.5(,as)-.4 G(pace, a k)
-2.5 E .3 -.15(ey s)-.1 H(tring, an equals).15 E(sign, a v)0 48 Q
(alue string, and a ne)-.25 E 2.5(wl)-.25 G(ine.)-2.5 E(The decimal num\
ber indicates the length of the entire line, including the)0 60 Q
(initial length \214eld and the trailing ne)0 72 Q(wline.)-.25 E 0 Cg EP
%%Page: 62 62
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An e)0 12 Q(xample of such a \214eld is:)-.15 E
(<br>)0 24 Q(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)0 36 Q
(<code></code><code>25</code><code> ctime=1084839148.1212\\n</code>)0 48
Q(<br>)0 60 Q -2.15 -.25(Ke y)0 72 T 2.5(si).25 G 2.5(na)-2.5 G(ll lo)
-2.5 E(wercase are standard k)-.25 E -.15(ey)-.1 G(s.).15 E 0 Cg EP
%%Page: 63 63
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)0 12 S(ndors can add their o)1.11 E
(wn k)-.25 E -.15(ey)-.1 G 2.5(sb).15 G 2.5(yp)-2.5 G
(re\214xing them with an all uppercase)-2.5 E -.15(ve)0 24 S
(ndor name and a period.).15 E(Note that, unlik)0 36 Q 2.5(et)-.1 G
(he historic header)-2.5 E 2.5(,n)-.4 G(umeric v)-2.5 E
(alues are stored using)-.25 E(decimal, not octal.)0 48 Q 2.5(Ad)0 60 S
(escription of some common k)-2.5 E -.15(ey)-.1 G 2.5(sf).15 G(ollo)-2.5
E(ws:)-.25 E(<dl compact>)0 72 Q 0 Cg EP
%%Page: 64 64
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>atime</b><b></b>,<b> ctime</b>\
<b></b>,<b> mtime</b><dd>)0 12 Q
(File access, inode change, and modi\214cation times.)0 24 Q
(These \214elds can be ne)0 36 Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve o)
-.25 H 2.5(ri).15 G(nclude a decimal point and a fractional v)-2.5 E
(alue.)-.25 E(<p><dt><b></b><b>uname</b><b></b>,<b> uid</b><b></b>,<b> \
gname</b><b></b>,<b> gid</b><dd>)0 48 Q
(User name, group name, and numeric UID and GID v)0 60 Q(alues.)-.25 E
(The user name and group name stored here are encoded in UTF8)0 72 Q 0
Cg EP
%%Page: 65 65
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and can thus include non-ASCII characters.)0 12
Q(The UID and GID \214elds can be of arbitrary length.)0 24 Q
(<p><dt><b></b><b>linkpath</b><dd>)0 36 Q(The full path of the link)0 48
Q(ed-to \214le.)-.1 E(Note that this is encoded in UTF8 and can thus in\
clude non-ASCII characters.)0 60 Q(<p><dt><b></b><b>path</b><dd>)0 72 Q
0 Cg EP
%%Page: 66 66
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The full pathname of the entry)0 12 Q(.)-.65 E(\
Note that this is encoded in UTF8 and can thus include non-ASCII charac\
ters.)0 24 Q(<p><dt><b></b><b>realtime.*</b><b></b>,<b> security)0 36 Q
(.*</b><dd>)-.65 E(These k)0 48 Q -.15(ey)-.1 G 2.5(sa).15 G(re reserv)
-2.5 E(ed and may be used for future standardization.)-.15 E
(<p><dt><b></b><b>size</b><dd>)0 60 Q(The size of the \214le.)0 72 Q 0
Cg EP
%%Page: 67 67
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(Note that there is no length limit on this \214eld, allo)0 12 Q
(wing conforming)-.25 E(archi)0 24 Q -.15(ve)-.25 G 2.5(st).15 G 2.5(os)
-2.5 G(tore \214les much lar)-2.5 E(ger than the historic 8GB limit.)
-.18 E(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(*</b><dd>)1.29 E
-1.11(Ve)0 48 S(ndor)1.11 E(-speci\214c attrib)-.2 E(utes used by Joer)
-.2 E 2.5(gS)-.18 G(chilling')-2.5 E(s)-.55 E(<b>star</b>)0 60 Q
(implementation.)0 72 Q 0 Cg EP
%%Page: 68 68
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G
(acl.access</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(acl.def)1.29 E
(ault</b><dd>)-.1 E(Stores the access and def)0 24 Q(ault A)-.1 E
(CLs as te)-.4 E(xtual strings in a format)-.15 E(that is an e)0 36 Q
(xtension of the format speci\214ed by POSIX.1e draft 17.)-.15 E
(In particular)0 48 Q 2.5(,e)-.4 G
(ach user or group access speci\214cation can include a fourth)-2.5 E
(colon-separated \214eld with the numeric UID or GID.)0 60 Q(This allo)0
72 Q(ws A)-.25 E(CLs to be restored on systems that may not ha)-.4 E .3
-.15(ve c)-.2 H(omplete).15 E 0 Cg EP
%%Page: 69 69
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(user or group information a)0 12 Q -.25(va)-.2 G
(ilable \(such as when NIS/YP or LD).25 E(AP services)-.4 E
(are temporarily una)0 24 Q -.25(va)-.2 G(ilable\).).25 E
(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(de)1.29 E
(vminor</b><b></b>,<b> SCHIL)-.25 E -1.29(Y.)-1 G(de)1.29 E
(vmajor</b><dd>)-.25 E(The full minor and major numbers for de)0 48 Q
(vice nodes.)-.25 E(<p><dt><b></b><b>SCHIL)0 60 Q -1.29(Y.)-1 G -.25
<668d>1.29 G(ags</b><dd>).25 E(The \214le \215ags.)0 72 Q 0 Cg EP
%%Page: 70 70
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G
(realsize</b><dd>)1.29 E(The full size of the \214le on disk.)0 24 Q
(XXX e)0 36 Q(xplain? XXX)-.15 E(<p><dt><b></b><b>SCHIL)0 48 Q -1.29(Y.)
-1 G(de)1.29 E -.65(v,)-.25 G(</b><b></b><b> SCHIL).65 E -1.29(Y.)-1 G
(ino</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(nlinks</b><dd>)1.29 E
(The de)0 60 Q(vice number)-.25 E 2.5(,i)-.4 G(node number)-2.5 E 2.5
(,a)-.4 G(nd link count for the entry)-2.5 E(.)-.65 E(In particular)0 72
Q 2.5(,n)-.4 G(ote that a pax interchange format archi)-2.5 E .3 -.15
(ve u)-.25 H(sing Joer).15 E(g)-.18 E 0 Cg EP
%%Page: 71 71
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Schilling')0 12 Q(s)-.55 E(<b></b><b>SCHIL)0 24
Q -1.29(Y.)-1 G(*</b>)1.29 E -.15(ex)0 36 S
(tensions can store all of the data from).15 E
(<i></i><i>struct</i><i> stat</i>.)0 48 Q(<p><dt><b></b><b>LIB)0 60 Q
(ARCHIVE.xattr)-.35 E(.</b><i></i><i>namespace</i><i></i>.<i>k)-.55 E
-.15(ey)-.1 G(</i><dd>).15 E(Libarchi)0 72 Q .3 -.15(ve s)-.25 H
(tores POSIX.1e-style e).15 E(xtended attrib)-.15 E(utes using)-.2 E 0
Cg EP
%%Page: 72 72
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.1(ke)0 12 S(ys of this form.)-.05 E(The)0 24 Q
(<i></i><i>k)0 36 Q -.15(ey)-.1 G(</i>).15 E -.25(va)0 48 S
(lue is URL-encoded:).25 E(All non-ASCII characters and the tw)0 60 Q
2.5(os)-.1 G(pecial characters)-2.5 E -.74(``)0 72 S(=').74 E(')-.74 E 0
Cg EP
%%Page: 73 73
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q -.74(``)0 24 S(%').74 E(')-.74 E
(are encoded as)0 36 Q -.74(``)0 48 S(%').74 E(')-.74 E(follo)0 60 Q
(wed by tw)-.25 E 2.5(ou)-.1 G(ppercase he)-2.5 E(xadecimal digits.)-.15
E(The v)0 72 Q(alue of this k)-.25 E .3 -.15(ey i)-.1 H 2.5(st).15 G
(he e)-2.5 E(xtended attrib)-.15 E(ute v)-.2 E(alue)-.25 E 0 Cg EP
%%Page: 74 74
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(encoded in base 64.)0 12 Q
(XXX Detail the base-64 format here XXX)0 24 Q
(<p><dt><b></b><b>VENDOR.*</b><dd>)0 36 Q(XXX document other v)0 48 Q
(endor)-.15 E(-speci\214c e)-.2 E(xtensions XXX)-.15 E(</dl>)0 60 Q(<p>)
36 72 Q 0 Cg EP
%%Page: 75 75
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An)0 12 Q 2.5(yv)-.15 G(alues stored in an e)
-2.75 E(xtended attrib)-.15 E(ute o)-.2 E -.15(ve)-.15 G
(rride the corresponding).15 E -.25(va)0 24 S(lues in the re).25 E
(gular tar header)-.15 E(.)-.55 E
(Note that compliant readers should ignore the re)0 36 Q
(gular \214elds when the)-.15 E(y)-.15 E(are o)0 48 Q -.15(ve)-.15 G
(rridden.).15 E(This is important, as e)0 60 Q(xisting archi)-.15 E -.15
(ve)-.25 G(rs are kno).15 E(wn to store non-compliant)-.25 E -.25(va)0
72 S(lues in the standard header \214elds in this situation.).25 E 0 Cg
EP
%%Page: 76 76
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are no limits on length for an)0 12 Q 2.5
(yo)-.15 G 2.5(ft)-2.5 G(hese \214elds.)-2.5 E(In particular)0 24 Q 2.5
(,n)-.4 G(umeric \214elds can be arbitrarily lar)-2.5 E(ge.)-.18 E
(All te)0 36 Q(xt \214elds are encoded in UTF8.)-.15 E
(Compliant writers should store only portable 7-bit ASCII characters in)
0 48 Q(the standard ustar header and use e)0 60 Q(xtended)-.15 E(attrib)
0 72 Q(utes whene)-.2 E -.15(ve)-.25 G 2.5(rat).15 G -.15(ex)-2.5 G 2.5
(tv).15 G(alue contains non-ASCII characters.)-2.75 E 0 Cg EP
%%Page: 77 77
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(In addition to the)0 24 Q
(<b></b><b>x</b>)0 36 Q(entry described abo)0 48 Q -.15(ve)-.15 G 2.5
(,t).15 G(he pax interchange format)-2.5 E(also supports a)0 60 Q
(<b></b><b>g</b>)0 72 Q 0 Cg EP
%%Page: 78 78
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(entry)0 12 Q(.)-.65 E(The)0 24 Q
(<b></b><b>g</b>)0 36 Q(entry is identical in format, b)0 48 Q
(ut speci\214es attrib)-.2 E(utes that serv)-.2 E 2.5(ea)-.15 G(s)-2.5 E
(def)0 60 Q(aults for all subsequent archi)-.1 E .3 -.15(ve e)-.25 H
(ntries.).15 E(The)0 72 Q 0 Cg EP
%%Page: 79 79
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>g</b>)0 12 Q
(entry is not widely used.)0 24 Q(<p>)36 36 Q(Besides the ne)0 48 Q(w)
-.25 E(<b></b><b>x</b>)0 60 Q(and)0 72 Q 0 Cg EP
%%Page: 80 80
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>g</b>)0 12 Q
(entries, the pax interchange format has a fe)0 24 Q 2.5(wo)-.25 G
(ther minor v)-2.5 E(ariations)-.25 E(from the earlier ustar format.)0
36 Q(The most troubling one is that hardlinks are permitted to ha)0 48 Q
-.15(ve)-.2 G(data follo)0 60 Q(wing them.)-.25 E(This allo)0 72 Q
(ws readers to restore an)-.25 E 2.5(yh)-.15 G
(ardlink to a \214le without)-2.5 E 0 Cg EP
%%Page: 81 81
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ha)0 12 Q(ving to re)-.2 E(wind the archi)-.25 E
.3 -.15(ve t)-.25 H 2.5<6f8c>.15 G(nd an earlier entry)-2.5 E(.)-.65 E
(Ho)0 24 Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(tc).4 G
(reates complications for rob)-2.5 E(ust readers, as it is no longer)-.2
E(clear whether or not the)0 36 Q 2.5(ys)-.15 G
(hould ignore the size \214eld for hardlink entries.)-2.5 E
(<h4 id="GNU T)36 48 Q(ar Archi)-.8 E -.15(ve)-.25 G(s">).15 E(GNU T)36
60 Q(ar Archi)-.8 E -.15(ve)-.25 G(s).15 E(</h4>)36 72 Q 0 Cg EP
%%Page: 82 82
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(The GNU tar program started with a pre-POSIX format similar to that)0
12 Q(described earlier and has e)0 24 Q(xtended it using se)-.15 E -.15
(ve)-.25 G(ral dif).15 E(ferent mechanisms:)-.25 E(It added ne)0 36 Q
2.5<778c>-.25 G(elds to the empty space in the header \(some of which w)
-2.5 E(as later)-.1 E(used by POSIX for con\215icting purposes\);)0 48 Q
(it allo)0 60 Q(wed the header to be continued o)-.25 E -.15(ve)-.15 G
2.5(rm).15 G(ultiple records;)-2.5 E(and it de\214ned ne)0 72 Q 2.5(we)
-.25 G(ntries that modify follo)-2.5 E(wing entries)-.25 E 0 Cg EP
%%Page: 83 83
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(similar in principle to the)0 12 Q
(<b></b><b>x</b>)0 24 Q(entry described abo)0 36 Q -.15(ve)-.15 G 2.5
(,b).15 G(ut each GNU special entry is single-purpose,)-2.7 E(unlik)0 48
Q 2.5(et)-.1 G(he general-purpose)-2.5 E(<b></b><b>x</b>)0 60 Q
(entry\).)0 72 Q 0 Cg EP
%%Page: 84 84
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(As a result, GNU tar archi)0 12 Q -.15(ve)-.25 G
2.5(sa).15 G(re not POSIX compatible, although)-2.5 E
(more lenient POSIX-compliant readers can successfully e)0 24 Q
(xtract most)-.15 E(GNU tar archi)0 36 Q -.15(ve)-.25 G(s.).15 E
(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP
%%Page: 85 85
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(struct header_gnu_tar {)0 12 Q(char name[100];)
36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q(char gid[8];)36 60 Q
(char size[12];)36 72 Q 0 Cg EP
%%Page: 86 86
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24
Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q
(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP
%%Page: 87 87
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q
(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E
(char atime[12];)36 60 Q(char ctime[12];)36 72 Q 0 Cg EP
%%Page: 88 88
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char of)36 12 Q(fset[12];)-.25 E
(char longnames[4];)36 24 Q(char unused[1];)36 36 Q(struct {)36 48 Q
(char of)72 60 Q(fset[12];)-.25 E(char numbytes[12];)72 72 Q 0 Cg EP
%%Page: 89 89
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF 2.5(}s)36 12 S(parse[4];)-2.5 E(char ise)36 24 Q
(xtended[1];)-.15 E(char realsize[12];)36 36 Q(char pad[17];)36 48 Q(};)
0 60 Q(</pre>)0 72 Q 0 Cg EP
%%Page: 90 90
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<dl compact>)0 36 Q
(<p><dt><i></i><i>type\215ag</i><dd>)0 48 Q(GNU tar uses the follo)0 60
Q(wing special entry types, in addition to)-.25 E
(those de\214ned by POSIX:)0 72 Q 0 Cg EP
%%Page: 91 91
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact>)0 12 Q(<p><dt>7<dd>)0 24 Q
(GNU tar treats type "7" records identically to type "0" records,)0 36 Q
-.15(ex)0 48 S(cept on one obscure R).15 E -.18(TO)-.6 G 2.5(Sw).18 G
(here the)-2.5 E 2.5(ya)-.15 G(re used to indicate the)-2.5 E
(pre-allocation of a contiguous \214le on disk.)0 60 Q(<p><dt>D<dd>)0 72
Q 0 Cg EP
%%Page: 92 92
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This indicates a directory entry)0 12 Q(.)-.65 E
(Unlik)0 24 Q 2.5(et)-.1 G(he POSIX-standard "5")-2.5 E
(type\215ag, the header is follo)0 36 Q
(wed by data records listing the names)-.25 E
(of \214les in this directory)0 48 Q(.)-.65 E
(Each name is preceded by an ASCII "Y")0 60 Q
(if the \214le is stored in this archi)0 72 Q .3 -.15(ve o)-.25 H 2.5
(r").15 G(N" if the \214le is not)-2.5 E 0 Cg EP
%%Page: 93 93
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(stored in this archi)0 12 Q -.15(ve)-.25 G(.).15
E(Each name is terminated with a null, and)0 24 Q(an e)0 36 Q
(xtra null marks the end of the name list.)-.15 E(The purpose of this)0
48 Q(entry is to support incremental backups; a program restoring from)0
60 Q(such an archi)0 72 Q .3 -.15(ve m)-.25 H
(ay wish to delete \214les on disk that did not e).15 E(xist)-.15 E 0 Cg
EP
%%Page: 94 94
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in the directory when the archi)0 12 Q .3 -.15
(ve w)-.25 H(as made.).05 E(<p>)36 24 Q(Note that the "D" type\215ag sp\
eci\214cally violates POSIX, which requires)0 36 Q
(that unrecognized type\215ags be restored as normal \214les.)0 48 Q
(In this case, restoring the "D" entry as a \214le could interfere)0 60
Q(with subsequent creation of the lik)0 72 Q(e-named directory)-.1 E(.)
-.65 E 0 Cg EP
%%Page: 95 95
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt>K<dd>)0 12 Q
(The data for this entry is a long linkname for the follo)0 24 Q
(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>L<dd>)0 36 Q
(The data for this entry is a long pathname for the follo)0 48 Q
(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>M<dd>)0 60 Q
(This is a continuation of the last \214le on the pre)0 72 Q(vious v)
-.25 E(olume.)-.2 E 0 Cg EP
%%Page: 96 96
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(GNU multi-v)0 12 Q(olume archi)-.2 E -.15(ve)
-.25 G 2.5(sg).15 G(uarantee that each v)-2.5 E(olume be)-.2 E
(gins with a v)-.15 E(alid)-.25 E(entry header)0 24 Q(.)-.55 E 1.6 -.8
(To e)0 36 T(nsure this, a \214le may be split, with part stored at the\
 end of one v).8 E(olume,)-.2 E(and part stored at the be)0 48 Q
(ginning of the ne)-.15 E(xt v)-.15 E(olume.)-.2 E
(The "M" type\215ag indicates that this entry continues an e)0 60 Q
(xisting \214le.)-.15 E
(Such entries can only occur as the \214rst or second entry)0 72 Q 0 Cg
EP
%%Page: 97 97
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in an archi)0 12 Q .3 -.15(ve \()-.25 H
(the latter only if the \214rst entry is a v).15 E(olume label\).)-.2 E
(The)0 24 Q(<i></i><i>size</i>)0 36 Q
(\214eld speci\214es the size of this entry)0 48 Q(.)-.65 E(The)0 60 Q
(<i></i><i>of)0 72 Q(fset</i>)-.25 E 0 Cg EP
%%Page: 98 98
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214eld at bytes 369-380 speci\214es the of)0 12
Q(fset where this \214le fragment)-.25 E(be)0 24 Q(gins.)-.15 E(The)0 36
Q(<i></i><i>realsize</i>)0 48 Q
(\214eld speci\214es the total size of the \214le \(which must equal)0
60 Q(<i></i><i>size</i>)0 72 Q 0 Cg EP
%%Page: 99 99
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(plus)0 12 Q(<i></i><i>of)0 24 Q(fset</i>\).)-.25
E(When e)0 36 Q
(xtracting, GNU tar checks that the header \214le name is the one it is)
-.15 E -.15(ex)0 48 S(pecting, that the header of).15 E
(fset is in the correct sequence, and that)-.25 E(the sum of of)0 60 Q
(fset and size is equal to realsize.)-.25 E(<p><dt>N<dd>)0 72 Q 0 Cg EP
%%Page: 100 100
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.8(Ty)0 12 S
(pe "N" records are no longer generated by GNU tar).8 E(.)-.55 E(The)0
24 Q 2.5(yc)-.15 G(ontained a)-2.5 E
(list of \214les to be renamed or symlink)0 36 Q(ed after e)-.1 E
(xtraction; this w)-.15 E(as)-.1 E
(originally used to support long names.)0 48 Q
(The contents of this record)0 60 Q(are a te)0 72 Q
(xt description of the operations to be done, in the form)-.15 E 0 Cg EP
%%Page: 101 101
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(Rename %s to %s\\n').74 E(')-.74
E(or)0 24 Q -.74(``)0 36 S(Symlink %s to %s\\n').74 E(';)-.74 E
(in either case, both)0 48 Q
(\214lenames are escaped using K&R C syntax.)0 60 Q
(Due to security concerns, "N" records are no)0 72 Q 2.5(wg)-.25 G
(enerally ignored)-2.5 E 0 Cg EP
%%Page: 102 102
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when reading archi)0 12 Q -.15(ve)-.25 G(s.).15
E(<p><dt>S<dd>)0 24 Q(This is a)0 36 Q -.74(``)0 48 S(sparse').74 E(')
-.74 E(re)0 60 Q(gular \214le.)-.15 E
(Sparse \214les are stored as a series of fragments.)0 72 Q 0 Cg EP
%%Page: 103 103
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The header contains a list of fragment of)0 12 Q
(fset/length pairs.)-.25 E
(If more than four such entries are required, the header is)0 24 Q -.15
(ex)0 36 S(tended as necessary with).15 E -.74(``)0 48 S -.15(ex).74 G
(tra').15 E(')-.74 E(header e)0 60 Q
(xtensions \(an older format that is no longer used\), or)-.15 E -.74
(``)0 72 S(sparse').74 E(')-.74 E 0 Cg EP
%%Page: 104 104
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(ex)0 12 S(tensions.).15 E(<p><dt>V<dd>)0 24
Q(The)0 36 Q(<i></i><i>name</i>)0 48 Q
(\214eld should be interpreted as a tape/v)0 60 Q(olume header name.)-.2
E(This entry should generally be ignored on e)0 72 Q(xtraction.)-.15 E 0
Cg EP
%%Page: 105 105
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</dl>)0 12 Q(<p><dt><i></i><i>magic</i><dd>)0 24
Q(The magic \214eld holds the \214v)0 36 Q 2.5(ec)-.15 G(haracters)-2.5
E -.74(``)0 48 S(ustar').74 E(')-.74 E(follo)0 60 Q(wed by a space.)-.25
E(Note that POSIX ustar archi)0 72 Q -.15(ve)-.25 G 2.5(sh).15 G -2.25
-.2(av e)-2.5 H 2.5(at)2.7 G(railing null.)-2.5 E 0 Cg EP
%%Page: 106 106
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><i></i><i>v)0 12 Q(ersion</i><dd>)-.15 E
(The v)0 24 Q(ersion \214eld holds a space character follo)-.15 E
(wed by a null.)-.25 E(Note that POSIX ustar archi)0 36 Q -.15(ve)-.25 G
2.5(su).15 G(se tw)-2.5 E 2.5(oc)-.1 G(opies of the ASCII digit)-2.5 E
-.74(``)0 48 S(0').74 E('.)-.74 E
(<p><dt><i></i><i>atime</i><i></i>,<i> ctime</i><dd>)0 60 Q
(The time the \214le w)0 72 Q(as last accessed and the time of)-.1 E 0
Cg EP
%%Page: 107 107
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(last change of \214le information, stored in octal as with)0 12 Q
(<i></i><i>mtime</i>.)0 24 Q(<p><dt><i></i><i>longnames</i><dd>)0 36 Q
(This \214eld is apparently no longer used.)0 48 Q
(<p><dt>Sparse<i></i><i> of)0 60 Q
(fset</i><i> /</i><i></i><i> numbytes</i><dd>)-.25 E
(Each such structure speci\214es a single fragment of a sparse)0 72 Q 0
Cg EP
%%Page: 108 108
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214le.)0 12 Q(The tw)0 24 Q 2.5<6f8c>-.1 G
(elds store v)-2.5 E(alues as octal numbers.)-.25 E
(The fragments are each padded to a multiple of 512 bytes)0 36 Q
(in the archi)0 48 Q -.15(ve)-.25 G(.).15 E(On e)0 60 Q
(xtraction, the list of fragments is collected from the)-.15 E
(header \(including an)0 72 Q 2.5(ye)-.15 G
(xtension headers\), and the data)-2.65 E 0 Cg EP
%%Page: 109 109
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(is then read and written to the \214le at appropriate of)0 12 Q(fsets.)
-.25 E(<p><dt><i></i><i>ise)0 24 Q(xtended</i><dd>)-.15 E
(If this is set to non-zero, the header will be follo)0 36 Q
(wed by additional)-.25 E -.74(``)0 48 S(sparse header').74 E(')-.74 E
(records.)0 60 Q(Each such record contains information about as man)0 72
Q 2.5(ya)-.15 G 2.5(s2)-2.5 G 2.5(1a)-2.5 G(dditional)-2.5 E 0 Cg EP
%%Page: 110 110
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(sparse blocks as sho)0 12 Q(wn here:)-.25 E
(<dl compact><dt><dd>)0 24 Q(<code>)0 36 Q(<pre>)0 48 Q
(struct gnu_sparse_header {)0 60 Q(struct {)36 72 Q 0 Cg EP
%%Page: 111 111
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char of)72 12 Q(fset[12];)-.25 E
(char numbytes[12];)72 24 Q 2.5(}s)36 36 S(parse[21];)-2.5 E 7.5
(char ise)36 48 R(xtended[1];)-.15 E 7.5(char padding[7];)36 60 R(};)0
72 Q 0 Cg EP
%%Page: 112 112
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</pre>)0 12 Q(</code>)0 24 Q(</dl>)0 36 Q
(<p><dt><i></i><i>realsize</i><dd>)0 48 Q 2.5(Ab)0 60 S
(inary representation of the \214le')-2.5 E 2.5(sc)-.55 G
(omplete size, with a much lar)-2.5 E(ger range)-.18 E
(than the POSIX \214le size.)0 72 Q 0 Cg EP
%%Page: 113 113
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(In particular)0 12 Q 2.5(,w)-.4 G(ith)-2.5 E
(<b></b><b>M</b>)0 24 Q
(type \214les, the current entry is only a portion of the \214le.)0 36 Q
(In that case, the POSIX size \214eld will indicate the size of this)0
48 Q(entry; the)0 60 Q(<i></i><i>realsize</i>)0 72 Q 0 Cg EP
%%Page: 114 114
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(\214eld will indicate the total size of the \214le.)0 12 Q(</dl>)0 24 Q
(<h4 id="GNU tar pax archi)36 36 Q -.15(ve)-.25 G(s">).15 E
(GNU tar pax archi)36 48 Q -.15(ve)-.25 G(s).15 E(</h4>)36 60 Q
(GNU tar 1.14 \(XXX check this XXX\) and later will write)0 72 Q 0 Cg EP
%%Page: 115 115
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(pax interchange format archi)0 12 Q -.15(ve)-.25
G 2.5(sw).15 G(hen you specify the)-2.5 E(<b>\255</b><b>-posix</b>)0 24
Q(\215ag.)0 36 Q(This format uses custom k)0 48 Q -.15(ey)-.1 G -.1(wo)
.15 G(rds to store sparse \214le information.).1 E(There ha)0 60 Q .3
-.15(ve b)-.2 H(een three iterations of this support, referred to).15 E
(as)0 72 Q 0 Cg EP
%%Page: 116 116
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(0.0').74 E(',)-.74 E -.74(``)0 24
S(0.1').74 E(',)-.74 E(and)0 36 Q -.74(``)0 48 S(1.0').74 E('.)-.74 E
(<dl compact>)0 60 Q
(<p><dt><b></b><b>GNU.sparse.numblocks</b><b></b>,<b> GNU.sparse.of)0 72
Q(fset</b><b></b>,<b> GNU.sparse.numbytes</b><b></b>,<b> GNU.sparse.siz\
e</b><dd>)-.25 E 0 Cg EP
%%Page: 117 117
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q -.74(``)0 24 S(0.0').74 E(')-.74 E
(format used an initial)0 36 Q(<b></b><b>GNU.sparse.numblocks</b>)0 48 Q
(attrib)0 60 Q
(ute to indicate the number of blocks in the \214le, a pair of)-.2 E
(<b></b><b>GNU.sparse.of)0 72 Q(fset</b>)-.25 E 0 Cg EP
%%Page: 118 118
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b></b><b>GNU.sparse.numbytes</b>)0
24 Q(to indicate the of)0 36 Q(fset and size of each block,)-.25 E
(and a single)0 48 Q(<b></b><b>GNU.sparse.size</b>)0 60 Q
(to indicate the full size of the \214le.)0 72 Q 0 Cg EP
%%Page: 119 119
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(This is not the same as the size in the tar header because the)0 12 Q
(latter v)0 24 Q(alue does not include the size of an)-.25 E 2.5(yh)-.15
G(oles.)-2.5 E(This format required that the order of attrib)0 36 Q
(utes be preserv)-.2 E(ed and)-.15 E
(relied on readers accepting multiple appearances of the same attrib)0
48 Q(ute)-.2 E(names, which is not of)0 60 Q
(\214cially permitted by the standards.)-.25 E
(<p><dt><b></b><b>GNU.sparse.map</b><dd>)0 72 Q 0 Cg EP
%%Page: 120 120
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q -.74(``)0 24 S(0.1').74 E(')-.74 E
(format used a single attrib)0 36 Q(ute that stored a comma-separated)
-.2 E(list of decimal numbers.)0 48 Q
(Each pair of numbers indicated the of)0 60 Q(fset and size, respecti)
-.25 E -.15(ve)-.25 G(ly).15 E(,)-.65 E(of a block of data.)0 72 Q 0 Cg
EP
%%Page: 121 121
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This does not w)0 12 Q(ork well if the archi)-.1
E .3 -.15(ve i)-.25 H 2.5(se).15 G(xtracted by an archi)-2.65 E -.15(ve)
-.25 G(r).15 E(that does not recognize this e)0 24 Q
(xtension, since man)-.15 E 2.5(yp)-.15 G(ax implementations)-2.5 E
(simply discard unrecognized attrib)0 36 Q(utes.)-.2 E(<p><dt><b></b><b\
>GNU.sparse.major</b><b></b>,<b> GNU.sparse.minor</b><b></b>,<b> GNU.sp\
arse.name</b><b></b>,<b> GNU.sparse.realsize</b><dd>)0 48 Q(The)0 60 Q
-.74(``)0 72 S(1.0').74 E(')-.74 E 0 Cg EP
%%Page: 122 122
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(format stores the sparse block map in one or more 512-byte blocks)0 12
Q(prepended to the \214le data in the entry body)0 24 Q(.)-.65 E
(The pax attrib)0 36 Q(utes indicate the e)-.2 E(xistence of this map)
-.15 E(\(via the)0 48 Q(<b></b><b>GNU.sparse.major</b>)0 60 Q(and)0 72 Q
0 Cg EP
%%Page: 123 123
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>GNU.sparse.minor</b>)0 12 Q
(\214elds\))0 24 Q(and the full size of the \214le.)0 36 Q(The)0 48 Q
(<b></b><b>GNU.sparse.name</b>)0 60 Q
(holds the true name of the \214le.)0 72 Q 0 Cg EP
%%Page: 124 124
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF 1.6 -.8(To a)0 12 T -.2(vo).6 G
(id confusion, the name stored in the re).2 E(gular tar header)-.15 E
(is a modi\214ed name so that e)0 24 Q
(xtraction errors will be apparent)-.15 E(to users.)0 36 Q(</dl>)0 48 Q
(<h4 id="Solaris T)36 60 Q(ar">)-.8 E(Solaris T)36 72 Q(ar)-.8 E 0 Cg EP
%%Page: 125 125
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(XXX More Details Needed XXX)0 24 Q
(<p>)36 36 Q(Solaris tar \(be)0 48 Q
(ginning with SunOS XXX 5.7 ?? XXX\) supports an)-.15 E -.74(``)0 60 S
-.15(ex).74 G(tended').15 E(')-.74 E
(format that is fundamentally similar to pax interchange format,)0 72 Q
0 Cg EP
%%Page: 126 126
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(with the follo)0 12 Q(wing dif)-.25 E(ferences:)
-.25 E(<ul>)0 24 Q(<li>)0 36 Q(Extended attrib)0 48 Q
(utes are stored in an entry whose type is)-.2 E(<b></b><b>X</b>,)0 60 Q
(not)0 72 Q 0 Cg EP
%%Page: 127 127
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>x</b>,)0 12 Q
(as used by pax interchange format.)0 24 Q
(The detailed format of this entry appears to be the same)0 36 Q
(as detailed abo)0 48 Q .3 -.15(ve f)-.15 H(or the).15 E
(<b></b><b>x</b>)0 60 Q(entry)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 128 128
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(An additional)0 24 Q
(<b></b><b>A</b>)0 36 Q(entry is used to store an A)0 48 Q
(CL for the follo)-.4 E(wing re)-.25 E(gular entry)-.15 E(.)-.65 E
(The body of this entry contains a se)0 60 Q -.15(ve)-.25 G
(n-digit octal number).15 E(follo)0 72 Q(wed by a zero byte, follo)-.25
E(wed by the)-.25 E 0 Cg EP
%%Page: 129 129
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(te)0 12 Q(xtual A)-.15 E(CL description.)-.4 E
(The octal v)0 24 Q(alue is the number of A)-.25 E(CL entries)-.4 E
(plus a constant that indicates the A)0 36 Q(CL type: 01000000)-.4 E
(for POSIX.1e A)0 48 Q(CLs and 03000000 for NFSv4 A)-.4 E(CLs.)-.4 E
(</ul>)0 60 Q(<h4 id="AIX T)36 72 Q(ar">)-.8 E 0 Cg EP
%%Page: 130 130
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(AIX T)36 12 Q(ar)-.8 E(</h4>)36 24 Q
(XXX More details needed XXX)0 36 Q(<h4 id="Mac OS X T)36 48 Q(ar">)-.8
E(Mac OS X T)36 60 Q(ar)-.8 E(</h4>)36 72 Q 0 Cg EP
%%Page: 131 131
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The tar distrib)0 12 Q(uted with Apple')-.2 E
2.5(sM)-.55 G(ac OS X stores most re)-2.5 E(gular \214les)-.15 E(as tw)0
24 Q 2.5(os)-.1 G(eparate entries in the tar archi)-2.5 E -.15(ve)-.25 G
(.).15 E(The tw)0 36 Q 2.5(oe)-.1 G(ntries ha)-2.5 E .3 -.15(ve t)-.2 H
(he same name e).15 E(xcept that the \214rst)-.15 E(one has)0 48 Q -.74
(``)0 60 S(._').74 E(')-.74 E(added to the be)0 72 Q
(ginning of the name.)-.15 E 0 Cg EP
%%Page: 132 132
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This \214rst entry stores the)0 12 Q -.74(``)0
24 S(resource fork').74 E(')-.74 E(with additional attrib)0 36 Q
(utes for the \214le.)-.2 E(The Mac OS X)0 48 Q(<b>Cop)0 60 Q
(yFile</b>\(<code></code>\))-.1 E
(API is used to separate a \214le on disk into separate)0 72 Q 0 Cg EP
%%Page: 133 133
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(resource and data streams and to reassemble those separate)0 12 Q
(streams when the \214le is restored to disk.)0 24 Q
(<h4 id="Other Extensions">)36 36 Q(Other Extensions)36 48 Q(</h4>)36 60
Q(One ob)0 72 Q(vious e)-.15 E
(xtension to increase the size of \214les is to)-.15 E 0 Cg EP
%%Page: 134 134
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(eliminate the terminating characters from the v)
0 12 Q(arious)-.25 E(numeric \214elds.)0 24 Q -.15(Fo)0 36 S 2.5(re).15
G(xample, the standard only allo)-2.65 E(ws the size \214eld to contain)
-.25 E(11 octal digits, reserving the twelfth byte for a trailing)0 48 Q
(NUL character)0 60 Q(.)-.55 E(Allo)0 72 Q(wing 12 octal digits allo)
-.25 E(ws \214le sizes up to 64 GB.)-.25 E 0 Cg EP
%%Page: 135 135
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Another e)0 24 Q
(xtension, utilized by GNU tar)-.15 E 2.5(,s)-.4 G(tar)-2.5 E 2.5(,a)-.4
G(nd other ne)-2.5 E(wer)-.25 E(<b>tar</b>)0 36 Q(implementations, perm\
its binary numbers in the standard numeric \214elds.)0 48 Q
(This is \215agged by setting the high bit of the \214rst byte.)0 60 Q
(This permits 95-bit v)0 72 Q(alues for the length and time \214elds)
-.25 E 0 Cg EP
%%Page: 136 136
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and 63-bit v)0 12 Q
(alues for the uid, gid, and de)-.25 E(vice numbers.)-.25 E
(GNU tar supports this e)0 24 Q(xtension for the)-.15 E
(length, mtime, ctime, and atime \214elds.)0 36 Q(Joer)0 48 Q 2.5(gS)
-.18 G(chilling')-2.5 E 2.5(ss)-.55 G(tar program supports this e)-2.5 E
(xtension for)-.15 E(all numeric \214elds.)0 60 Q(Note that this e)0 72
Q(xtension is lar)-.15 E(gely obsoleted by the e)-.18 E(xtended attrib)
-.15 E(ute)-.2 E 0 Cg EP
%%Page: 137 137
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(record pro)0 12 Q
(vided by the pax interchange format.)-.15 E(<p>)36 24 Q
(Another early GNU e)0 36 Q(xtension allo)-.15 E(wed base-64 v)-.25 E
(alues rather than octal.)-.25 E(This e)0 48 Q(xtension w)-.15 E
(as short-li)-.1 E -.15(ve)-.25 G 2.5(da).15 G
(nd is no longer supported by an)-2.5 E(y)-.15 E(implementation.)0 60 Q
(<h3 id="SEE ALSO">)36 72 Q 0 Cg EP
%%Page: 138 138
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(SEE ALSO)36 12 Q(</h3>)36 24 Q
(<a href="../html1/ar)0 36 Q(.html">ar\(1\)</a>,)-.55 E
(<a href="../html1/pax.html">pax\(1\)</a>,)0 48 Q(<a href="../html1/tar)
0 60 Q(.html">tar\(1\)</a>)-.55 E(<h3 id="ST)36 72 Q(AND)-.93 E(ARDS">)
-.4 E 0 Cg EP
%%Page: 139 139
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ST)36 12 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 24 Q
(The)0 36 Q(<b>tar</b>)0 48 Q
(utility is no longer a part of POSIX or the Single Unix Standard.)0 60
Q(It last appeared in)0 72 Q 0 Cg EP
%%Page: 140 140
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)2.5 12 S
(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E
('\) .)-.74 E(It has been supplanted in subsequent standards by)0 24 Q
(<a href="../html1/pax.html">pax\(1\)</a>.)0 36 Q
(The ustar format is currently part of the speci\214cation for the)0 48
Q(<a href="../html1/pax.html">pax\(1\)</a>)0 60 Q(utility)0 72 Q(.)-.65
E 0 Cg EP
%%Page: 141 141
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The pax interchange \214le format is ne)0 12 Q
2.5(ww)-.25 G(ith)-2.5 E(IEEE Std 1003.1-2001 \(`)2.5 24 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(<h3 id="HIST)36 36
Q(OR)-.18 E(Y">)-.65 E(HIST)36 48 Q(OR)-.18 E(Y)-.65 E(</h3>)36 60 Q(A)0
72 Q 0 Cg EP
%%Page: 142 142
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>tar</b>)0 12 Q(command appeared in Se)0 24 Q
-.15(ve)-.25 G(nth Edition Unix, which w).15 E(as released in January)
-.1 E 2.5(,1)-.65 G(979.)-2.5 E(It replaced the)0 36 Q(<b>tp</b>)0 48 Q
(program from F)0 60 Q(ourth Edition Unix which in turn replaced the)
-.15 E(<b>tap</b>)0 72 Q 0 Cg EP
%%Page: 143 143
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(program from First Edition Unix.)0 12 Q
(John Gilmore')0 24 Q(s)-.55 E(<b>pdtar</b>)0 36 Q
(public-domain implementation \(circa 1987\) w)0 48 Q
(as highly in\215uential)-.1 E(and formed the basis of)0 60 Q
(<b>GNU</b><b>tar</b>)0 72 Q 0 Cg EP
%%Page: 144 144
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(circa 1988\).)0 12 Q(Joer)0 24 Q 2.5(gS)-.18 G
(hilling')-2.5 E(s)-.55 E(<b>star</b>)0 36 Q(archi)0 48 Q -.15(ve)-.25 G
2.5(ri).15 G 2.5(sa)-2.5 G(nother open-source \(GPL\) archi)-2.5 E -.15
(ve)-.25 G 2.5(r\().15 G(originally de)-2.5 E -.15(ve)-.25 G(loped).15 E
(circa 1985\) which features complete support for pax interchange)0 60 Q
(format.)0 72 Q 0 Cg EP
%%Page: 145 145
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(This documentation w)0 24 Q
(as written as part of the)-.1 E(<b>libarchi)0 36 Q -.15(ve)-.25 G(</b>)
.15 E(and)0 48 Q(<b>bsdtar</b>)0 60 Q(project by)0 72 Q 0 Cg EP
%%Page: 146 146
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.35(Ti)0 12 S 2.5(mK).35 G
(ientzle &lt;kientzle@@FreeBSD.or)-2.5 E(g&gt;<br>.)-.18 E(</body>)0 24 Q
(</html>)0 36 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.3
log
@libarchive-2.8.3: Build fix for Linux
@
text
@d1 1657
a1657 1400
<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Sun Mar 14 19:50:35 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title></title>
</head>
<body>

<hr>


<p valign="top">tar(5) FreeBSD File Formats Manual
tar(5)</p>

<p style="margin-top: 1em" valign="top"><b>NAME</b></p>

<p style="margin-left:8%;"><b>tar</b> &mdash; format of
tape archive files</p>


<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>

<p style="margin-left:8%;">The <b>tar</b> archive format
collects any number of files, directories, and other file
system objects (symbolic links, device nodes, etc.) into a
single stream of bytes. The format was originally designed
to be used with tape drives that operate with fixed-size
blocks, but is widely used as a general packaging
mechanism.</p>

<p style="margin-left:8%; margin-top: 1em"><b>General
Format</b> <br>
A <b>tar</b> archive consists of a series of 512-byte
records. Each file system object requires a header record
which stores basic metadata (pathname, owner, permissions,
etc.) and zero or more records containing any file data. The
end of the archive is indicated by two records consisting
entirely of zero bytes.</p>

<p style="margin-left:8%; margin-top: 1em">For
compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a
fixed number of records with each I/O operation. These
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
implementations was 10240 bytes or 20 records. This is still
the default for most implementations although block sizes of
1MiB (2048 records) or larger are commonly used with modern
high-speed tape drives. (Note: the terms
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>

<p style="margin-left:8%; margin-top: 1em"><b>Old-Style
Archive Format</b> <br>
The original tar archive format has been extended many times
to include additional information that various implementors
found necessary. This section describes the variant
implemented by the tar command included in Version&nbsp;7
AT&amp;T UNIX, which seems to be the earliest widely-used
version of the tar program.</p>

<p style="margin-left:8%; margin-top: 1em">The header
record for an old-style <b>tar</b> archive consists of the
following:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_old_tar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkflag[1];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[255];</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">};</p>

<p style="margin-left:8%;">All unused bytes in the header
record are filled with nulls.</p>

<p style="margin-top: 1em" valign="top"><i>name</i></p>

<p style="margin-left:20%; margin-top: 1em">Pathname,
stored as a null-terminated string. Early tar
implementations only stored regular files (including
hardlinks to those files). One common early convention used
a trailing &quot;/&quot; character to indicate a directory
name, allowing directory permissions and owner information
to be archived and restored.</p>

<p style="margin-top: 1em" valign="top"><i>mode</i></p>

<p style="margin-left:20%; margin-top: 1em">File mode,
stored as an octal number in ASCII.</p>

<p style="margin-top: 1em" valign="top"><i>uid</i>,
<i>gid</i></p>

<p style="margin-left:20%;">User id and group id of owner,
as octal numbers in ASCII.</p>

<p style="margin-top: 1em" valign="top"><i>size</i></p>

<p style="margin-left:20%; margin-top: 1em">Size of file,
as octal number in ASCII. For regular files only, this
indicates the amount of data that follows the header. In
particular, this field was ignored by early tar
implementations when extracting hardlinks. Modern writers
should always store a zero length for hardlink entries.</p>

<p style="margin-top: 1em" valign="top"><i>mtime</i></p>

<p style="margin-left:20%; margin-top: 1em">Modification
time of file, as an octal number in ASCII. This indicates
the number of seconds since the start of the epoch, 00:00:00
UTC January 1, 1970. Note that negative values should be
avoided here, as they are handled inconsistently.</p>


<p style="margin-top: 1em" valign="top"><i>checksum</i></p>

<p style="margin-left:20%;">Header checksum, stored as an
octal number in ASCII. To compute the checksum, set the
checksum field to all spaces, then sum all bytes in the
header using unsigned arithmetic. This field should be
stored as six octal digits followed by a null and a space
character. Note that many early implementations of tar used
signed arithmetic for the checksum field, which can cause
interoperability problems when transferring archives between
systems. Modern robust readers compute the checksum both
ways and accept the header if either computation
matches.</p>

<p style="margin-top: 1em" valign="top"><i>linkflag</i>,
<i>linkname</i></p>

<p style="margin-left:20%;">In order to preserve hardlinks
and conserve tape, a file with multiple links is only
written to the archive the first time it is encountered. The
next time it is encountered, the <i>linkflag</i> is set to
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
the first name under which this file appears. (Note that
regular files have a null value in the <i>linkflag</i>
field.)</p>

<p style="margin-left:8%; margin-top: 1em">Early tar
implementations varied in how they terminated these fields.
The tar command in Version&nbsp;7 AT&amp;T UNIX used the
following conventions (this is also documented in early BSD
manpages): the pathname must be null-terminated; the mode,
uid, and gid fields must end in a space and a null byte; the
size and mtime fields must end in a space; the checksum is
terminated by a null and a space. Early implementations
filled the numeric fields with leading spaces. This seems to
have been common practice until the IEEE Std 1003.1-1988
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Pre-POSIX
Archives</b> <br>
An early draft of IEEE Std 1003.1-1988
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
described below with the following variations:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The magic value is
&lsquo;&lsquo;ustar&nbsp;&rsquo;&rsquo; (note the following
space). The version field contains a space character
followed by a null.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The numeric fields are
generally filled with leading spaces (not leading zeros as
recommended in the final standard).</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">The prefix field is often not
used, limiting pathnames to the 100 characters of old-style
archives.</p>

<p style="margin-left:8%; margin-top: 1em"><b>POSIX ustar
Archives</b> <br>
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_posix_ustar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char typeflag[1];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char magic[6];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char version[2];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uname[32];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gname[32];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devmajor[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devminor[8];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char prefix[155];</p></td>
<td width="58%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[12];</p></td>
<td width="58%">
</td>
</table>

<p style="margin-left:17%;">};</p>


<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">Type of entry. POSIX extended
the earlier <i>linkflag</i> field with several new type
values:</p>

<p valign="top">&lsquo;&lsquo;0&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Regular file.
NUL should be treated as a synonym, for compatibility
purposes.</p>

<p valign="top">&lsquo;&lsquo;1&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Hard link.</p>

<p valign="top">&lsquo;&lsquo;2&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Symbolic
link.</p>

<p valign="top">&lsquo;&lsquo;3&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Character
device node.</p>

<p valign="top">&lsquo;&lsquo;4&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Block device
node.</p>

<p valign="top">&lsquo;&lsquo;5&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Directory.</p>

<p valign="top">&lsquo;&lsquo;6&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">FIFO node.</p>

<p valign="top">&lsquo;&lsquo;7&rsquo;&rsquo;</p>

<p style="margin-left:32%; margin-top: 1em">Reserved.</p>

<p valign="top">Other</p>

<p style="margin-left:32%; margin-top: 1em">A
POSIX-compliant implementation must treat any unrecognized
typeflag value as a regular file. In particular, writers
should ensure that all entries have a valid filename so that
they can be restored by readers that do not support the
corresponding extension. Uppercase letters &quot;A&quot;
through &quot;Z&quot; are reserved for custom extensions.
Note that sockets and whiteout entries are not
archivable.</p>

<p style="margin-left:20%;">It is worth noting that the
<i>size</i> field, in particular, has different meanings
depending on the type. For regular files, of course, it
indicates the amount of data following the header. For
directories, it may be used to indicate the total size of
all files in the directory, for use by operating systems
that pre-allocate directory space. For all other types, it
should be set to zero by writers and ignored by readers.</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">Contains the
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>

<p style="margin-top: 1em" valign="top"><i>version</i></p>

<p style="margin-left:20%;">Version. This should be
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>

<p style="margin-top: 1em" valign="top"><i>uname</i>,
<i>gname</i></p>

<p style="margin-left:20%;">User and group names, as
null-terminated ASCII strings. These should be used in
preference to the uid/gid values when they are set and the
corresponding names exist on the system.</p>

<p style="margin-top: 1em" valign="top"><i>devmajor</i>,
<i>devminor</i></p>

<p style="margin-left:20%;">Major and minor numbers for
character device or block device entry.</p>

<p style="margin-top: 1em" valign="top"><i>name</i>,
<i>prefix</i></p>

<p style="margin-left:20%;">If the pathname is too long to
fit in the 100 bytes provided by the standard format, it can
be split at any <i>/</i> character with the first portion
going into the prefix field. If the prefix field is not
empty, the reader will prepend the prefix value and a
<i>/</i> character to the regular name field to obtain the
full pathname. The standard does not require a trailing
<i>/</i> character on directory names, though most
implementations still include this for compatibility
reasons.</p>

<p style="margin-left:8%; margin-top: 1em">Note that all
unused bytes must be set to NUL.</p>

<p style="margin-left:8%; margin-top: 1em">Field
termination is specified slightly differently by POSIX than
by previous implementations. The <i>magic</i>, <i>uname</i>,
and <i>gname</i> fields must have a trailing NUL. The
<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields
must have a trailing NUL unless they fill the entire field.
(In particular, it is possible to store a 256-character
pathname if it happens to have a <i>/</i> as the 156th
character.) POSIX requires numeric fields to be zero-padded
in the front, and requires them to be terminated with either
space or NUL characters.</p>

<p style="margin-left:8%; margin-top: 1em">Currently, most
tar implementations comply with the ustar format,
occasionally extending it by adding new fields to the blank
area at the end of the header record.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Pax
Interchange Format</b> <br>
There are many attributes that cannot be portably stored in
a POSIX ustar archive. IEEE Std 1003.1-2001
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>

<p style="margin-left:8%; margin-top: 1em">An entry in a
pax interchange format archive consists of one or two
standard ustar entries, each with its own header and data.
The first optional entry stores the extended attributes for
the following entry. This optional first entry has an
&quot;x&quot; typeflag and a size field that indicates the
total size of the extended attributes. The extended
attributes themselves are stored as a series of text-format
lines encoded in the portable UTF-8 encoding. Each line
consists of a decimal number, a space, a key string, an
equals sign, a value string, and a new line. The decimal
number indicates the length of the entire line, including
the initial length field and the trailing newline. An
example of such a field is:</p>

<p style="margin-left:17%;">25 ctime=1084839148.1212\n</p>

<p style="margin-left:8%;">Keys in all lowercase are
standard keys. Vendors can add their own keys by prefixing
them with an all uppercase vendor name and a period. Note
that, unlike the historic header, numeric values are stored
using decimal, not octal. A description of some common keys
follows:</p>

<p style="margin-top: 1em" valign="top"><b>atime</b>,
<b>ctime</b>, <b>mtime</b></p>

<p style="margin-left:20%;">File access, inode change, and
modification times. These fields can be negative or include
a decimal point and a fractional value.</p>

<p style="margin-top: 1em" valign="top"><b>uname</b>,
<b>uid</b>, <b>gname</b>, <b>gid</b></p>

<p style="margin-left:20%;">User name, group name, and
numeric UID and GID values. The user name and group name
stored here are encoded in UTF8 and can thus include
non-ASCII characters. The UID and GID fields can be of
arbitrary length.</p>


<p style="margin-top: 1em" valign="top"><b>linkpath</b></p>

<p style="margin-left:20%;">The full path of the linked-to
file. Note that this is encoded in UTF8 and can thus include
non-ASCII characters.</p>

<p style="margin-top: 1em" valign="top"><b>path</b></p>

<p style="margin-left:20%; margin-top: 1em">The full
pathname of the entry. Note that this is encoded in UTF8 and
can thus include non-ASCII characters.</p>

<p style="margin-top: 1em" valign="top"><b>realtime.*</b>,
<b>security.*</b></p>

<p style="margin-left:20%;">These keys are reserved and may
be used for future standardization.</p>

<p style="margin-top: 1em" valign="top"><b>size</b></p>

<p style="margin-left:20%; margin-top: 1em">The size of the
file. Note that there is no length limit on this field,
allowing conforming archives to store files much larger than
the historic 8GB limit.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.*</b></p>

<p style="margin-left:20%;">Vendor-specific attributes used
by Joerg Schilling&rsquo;s <b>star</b> implementation.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.acl.access</b>,
<b>SCHILY.acl.default</b></p>

<p style="margin-left:20%;">Stores the access and default
ACLs as textual strings in a format that is an extension of
the format specified by POSIX.1e draft 17. In particular,
each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID. This
allows ACLs to be restored on systems that may not have
complete user or group information available (such as when
NIS/YP or LDAP services are temporarily unavailable).</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.devminor</b>,
<b>SCHILY.devmajor</b></p>

<p style="margin-left:20%;">The full minor and major
numbers for device nodes.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.fflags</b></p>

<p style="margin-left:20%;">The file flags.</p>


<p style="margin-top: 1em" valign="top"><b>SCHILY.realsize</b></p>

<p style="margin-left:20%;">The full size of the file on
disk. XXX explain? XXX</p>

<p style="margin-top: 1em" valign="top"><b>SCHILY.dev,
SCHILY.ino</b>, <b>SCHILY.nlinks</b></p>

<p style="margin-left:20%;">The device number, inode
number, and link count for the entry. In particular, note
that a pax interchange format archive using Joerg
Schilling&rsquo;s <b>SCHILY.*</b> extensions can store all
of the data from <i>struct stat</i>.</p>


<p style="margin-top: 1em" valign="top"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p>

<p style="margin-left:20%;">Libarchive stores
POSIX.1e-style extended attributes using keys of this form.
The <i>key</i> value is URL-encoded: All non-ASCII
characters and the two special characters
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>


<p style="margin-top: 1em" valign="top"><b>VENDOR.*</b></p>

<p style="margin-left:20%;">XXX document other
vendor-specific extensions XXX</p>

<p style="margin-left:8%; margin-top: 1em">Any values
stored in an extended attribute override the corresponding
values in the regular tar header. Note that compliant
readers should ignore the regular fields when they are
overridden. This is important, as existing archivers are
known to store non-compliant values in the standard header
fields in this situation. There are no limits on length for
any of these fields. In particular, numeric fields can be
arbitrarily large. All text fields are encoded in UTF8.
Compliant writers should store only portable 7-bit ASCII
characters in the standard ustar header and use extended
attributes whenever a text value contains non-ASCII
characters.</p>

<p style="margin-left:8%; margin-top: 1em">In addition to
the <b>x</b> entry described above, the pax interchange
format also supports a <b>g</b> entry. The <b>g</b> entry is
identical in format, but specifies attributes that serve as
defaults for all subsequent archive entries. The <b>g</b>
entry is not widely used.</p>

<p style="margin-left:8%; margin-top: 1em">Besides the new
<b>x</b> and <b>g</b> entries, the pax interchange format
has a few other minor variations from the earlier ustar
format. The most troubling one is that hardlinks are
permitted to have data following them. This allows readers
to restore any hardlink to a file without having to rewind
the archive to find an earlier entry. However, it creates
complications for robust readers, as it is no longer clear
whether or not they should ignore the size field for
hardlink entries.</p>

<p style="margin-left:8%; margin-top: 1em"><b>GNU Tar
Archives</b> <br>
The GNU tar program started with a pre-POSIX format similar
to that described earlier and has extended it using several
different mechanisms: It added new fields to the empty space
in the header (some of which was later used by POSIX for
conflicting purposes); it allowed the header to be continued
over multiple records; and it defined new entries that
modify following entries (similar in principle to the
<b>x</b> entry described above, but each GNU special entry
is single-purpose, unlike the general-purpose <b>x</b>
entry). As a result, GNU tar archives are not POSIX
compatible, although more lenient POSIX-compliant readers
can successfully extract most GNU tar archives.</p>

<p style="margin-left:17%; margin-top: 1em">struct
header_gnu_tar {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char name[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mode[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gid[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char size[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char mtime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char checksum[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char typeflag[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char linkname[100];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char magic[6];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char version[2];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char uname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char gname[32];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devmajor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char devminor[8];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char atime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char ctime[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char offset[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char longnames[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char unused[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">
</td>
<td width="12%">


<p valign="top">char offset[12];</p></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">
</td>
<td width="12%">


<p valign="top">char numbytes[12];</p></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">} sparse[4];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char realsize[12];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
<tr valign="top" align="left">
<td width="29%"></td>
<td width="13%">


<p valign="top">char pad[17];</p></td>
<td width="12%"></td>
<td width="46%">
</td>
</table>

<p style="margin-left:17%;">};</p>


<p style="margin-top: 1em" valign="top"><i>typeflag</i></p>

<p style="margin-left:20%;">GNU tar uses the following
special entry types, in addition to those defined by
POSIX:</p>

<p style="margin-top: 1em" valign="top">7</p>

<p style="margin-left:32%; margin-top: 1em">GNU tar treats
type &quot;7&quot; records identically to type &quot;0&quot;
records, except on one obscure RTOS where they are used to
indicate the pre-allocation of a contiguous file on
disk.</p>

<p style="margin-top: 1em" valign="top">D</p>

<p style="margin-left:32%; margin-top: 1em">This indicates
a directory entry. Unlike the POSIX-standard &quot;5&quot;
typeflag, the header is followed by data records listing the
names of files in this directory. Each name is preceded by
an ASCII &quot;Y&quot; if the file is stored in this archive
or &quot;N&quot; if the file is not stored in this archive.
Each name is terminated with a null, and an extra null marks
the end of the name list. The purpose of this entry is to
support incremental backups; a program restoring from such
an archive may wish to delete files on disk that did not
exist in the directory when the archive was made.</p>

<p style="margin-left:32%; margin-top: 1em">Note that the
&quot;D&quot; typeflag specifically violates POSIX, which
requires that unrecognized typeflags be restored as normal
files. In this case, restoring the &quot;D&quot; entry as a
file could interfere with subsequent creation of the
like-named directory.</p>

<p style="margin-top: 1em" valign="top">K</p>

<p style="margin-left:32%; margin-top: 1em">The data for
this entry is a long linkname for the following regular
entry.</p>

<p style="margin-top: 1em" valign="top">L</p>

<p style="margin-left:32%; margin-top: 1em">The data for
this entry is a long pathname for the following regular
entry.</p>

<p style="margin-top: 1em" valign="top">M</p>

<p style="margin-left:32%; margin-top: 1em">This is a
continuation of the last file on the previous volume. GNU
multi-volume archives guarantee that each volume begins with
a valid entry header. To ensure this, a file may be split,
with part stored at the end of one volume, and part stored
at the beginning of the next volume. The &quot;M&quot;
typeflag indicates that this entry continues an existing
file. Such entries can only occur as the first or second
entry in an archive (the latter only if the first entry is a
volume label). The <i>size</i> field specifies the size of
this entry. The <i>offset</i> field at bytes 369-380
specifies the offset where this file fragment begins. The
<i>realsize</i> field specifies the total size of the file
(which must equal <i>size</i> plus <i>offset</i>). When
extracting, GNU tar checks that the header file name is the
one it is expecting, that the header offset is in the
correct sequence, and that the sum of offset and size is
equal to realsize.</p>

<p style="margin-top: 1em" valign="top">N</p>

<p style="margin-left:32%; margin-top: 1em">Type
&quot;N&quot; records are no longer generated by GNU tar.
They contained a list of files to be renamed or symlinked
after extraction; this was originally used to support long
names. The contents of this record are a text description of
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
archives.</p>

<p style="margin-top: 1em" valign="top">S</p>

<p style="margin-left:32%; margin-top: 1em">This is a
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>

<p style="margin-top: 1em" valign="top">V</p>

<p style="margin-left:32%; margin-top: 1em">The <i>name</i>
field should be interpreted as a tape/volume header name.
This entry should generally be ignored on extraction.</p>

<p style="margin-top: 1em" valign="top"><i>magic</i></p>

<p style="margin-left:20%; margin-top: 1em">The magic field
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>

<p style="margin-top: 1em" valign="top"><i>version</i></p>

<p style="margin-left:20%;">The version field holds a space
character followed by a null. Note that POSIX ustar archives
use two copies of the ASCII digit
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em" valign="top"><i>atime</i>,
<i>ctime</i></p>

<p style="margin-left:20%;">The time the file was last
accessed and the time of last change of file information,
stored in octal as with <i>mtime</i>.</p>


<p style="margin-top: 1em" valign="top"><i>longnames</i></p>

<p style="margin-left:20%;">This field is apparently no
longer used.</p>

<p style="margin-top: 1em" valign="top">Sparse <i>offset /
numbytes</i></p>

<p style="margin-left:20%;">Each such structure specifies a
single fragment of a sparse file. The two fields store
values as octal numbers. The fragments are each padded to a
multiple of 512 bytes in the archive. On extraction, the
list of fragments is collected from the header (including
any extension headers), and the data is then read and
written to the file at appropriate offsets.</p>


<p style="margin-top: 1em" valign="top"><i>isextended</i></p>

<p style="margin-left:20%;">If this is set to non-zero, the
header will be followed by additional &lsquo;&lsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>

<p style="margin-left:29%; margin-top: 1em">struct
gnu_sparse_header {</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">struct {</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">
</td>
<td width="12%">


<p valign="top">char offset[12];</p></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">
</td>
<td width="12%">


<p valign="top">char numbytes[12];</p></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">} sparse[21];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">char isextended[1];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
<tr valign="top" align="left">
<td width="42%"></td>
<td width="12%">


<p valign="top">char padding[7];</p></td>
<td width="12%"></td>
<td width="34%">
</td>
</table>

<p style="margin-left:29%;">};</p>


<p style="margin-top: 1em" valign="top"><i>realsize</i></p>

<p style="margin-left:20%;">A binary representation of the
file&rsquo;s complete size, with a much larger range than
the POSIX file size. In particular, with <b>M</b> type
files, the current entry is only a portion of the file. In
that case, the POSIX size field will indicate the size of
this entry; the <i>realsize</i> field will indicate the
total size of the file.</p>

<p style="margin-left:8%; margin-top: 1em"><b>GNU tar pax
archives</b> <br>
GNU tar 1.14 (XXX check this XXX) and later will write pax
interchange format archives when you specify the
<b>&minus;-posix</b> flag. This format uses custom keywords
to store sparse file information. There have been three
iterations of this support, referred to as
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.numblocks</b>,
<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>,
<b>GNU.sparse.size</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
size of each block, and a single <b>GNU.sparse.size</b> to
indicate the full size of the file. This is not the same as
the size in the tar header because the latter value does not
include the size of any holes. This format required that the
order of attributes be preserved and relied on readers
accepting multiple appearances of the same attribute names,
which is not officially permitted by the standards.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.map</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
the archive is extracted by an archiver that does not
recognize this extension, since many pax implementations
simply discard unrecognized attributes.</p>


<p style="margin-top: 1em" valign="top"><b>GNU.sparse.major</b>,
<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>,
<b>GNU.sparse.realsize</b></p>

<p style="margin-left:20%;">The
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
<b>GNU.sparse.minor</b> fields) and the full size of the
file. The <b>GNU.sparse.name</b> holds the true name of the
file. To avoid confusion, the name stored in the regular tar
header is a modified name so that extraction errors will be
apparent to users.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Solaris
Tar</b> <br>
XXX More Details Needed XXX</p>

<p style="margin-left:8%; margin-top: 1em">Solaris tar
(beginning with SunOS XXX 5.7 ?? XXX) supports an
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">Extended attributes are stored
in an entry whose type is <b>X</b>, not <b>x</b>, as used by
pax interchange format. The detailed format of this entry
appears to be the same as detailed above for the <b>x</b>
entry.</p>

<p valign="top"><b>&bull;</b></p>

<p style="margin-left:20%;">An additional <b>A</b> entry is
used to store an ACL for the following regular entry. The
body of this entry contains a seven-digit octal number
followed by a zero byte, followed by the textual ACL
description. The octal value is the number of ACL entries
plus a constant that indicates the ACL type: 01000000 for
POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p>

<p style="margin-left:8%; margin-top: 1em"><b>AIX Tar</b>
<br>
XXX More details needed XXX</p>

<p style="margin-left:8%; margin-top: 1em"><b>Mac OS X
Tar</b> <br>
The tar distributed with Apple&rsquo;s Mac OS X stores most
regular files as two separate entries in the tar archive.
The two entries have the same name except that the first one
has &lsquo;&lsquo;._&rsquo;&rsquo; added to the beginning of
the name. This first entry stores the &lsquo;&lsquo;resource
fork&rsquo;&rsquo; with additional attributes for the file.
The Mac OS X <b>CopyFile</b>() API is used to separate a
file on disk into separate resource and data streams and to
reassemble those separate streams when the file is restored
to disk.</p>

<p style="margin-left:8%; margin-top: 1em"><b>Other
Extensions</b> <br>
One obvious extension to increase the size of files is to
eliminate the terminating characters from the various
numeric fields. For example, the standard only allows the
size field to contain 11 octal digits, reserving the twelfth
byte for a trailing NUL character. Allowing 12 octal digits
allows file sizes up to 64 GB.</p>

<p style="margin-left:8%; margin-top: 1em">Another
extension, utilized by GNU tar, star, and other newer
<b>tar</b> implementations, permits binary numbers in the
standard numeric fields. This is flagged by setting the high
bit of the first byte. This permits 95-bit values for the
length and time fields and 63-bit values for the uid, gid,
and device numbers. GNU tar supports this extension for the
length, mtime, ctime, and atime fields. Joerg
Schilling&rsquo;s star program supports this extension for
all numeric fields. Note that this extension is largely
obsoleted by the extended attribute record provided by the
pax interchange format.</p>

<p style="margin-left:8%; margin-top: 1em">Another early
GNU extension allowed base-64 values rather than octal. This
extension was short-lived and is no longer supported by any
implementation.</p>

<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>

<p style="margin-left:8%;">ar(1), pax(1), tar(1)</p>


<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>

<p style="margin-left:8%;">The <b>tar</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>

<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>

<p style="margin-left:8%;">A <b>tar</b> command appeared in
Seventh Edition Unix, which was released in January, 1979.
It replaced the <b>tp</b> program from Fourth Edition Unix
which in turn replaced the <b>tap</b> program from First
Edition Unix. John Gilmore&rsquo;s <b>pdtar</b>
public-domain implementation (circa 1987) was highly
influential and formed the basis of <b>GNU tar</b> (circa
1988). Joerg Shilling&rsquo;s <b>star</b> archiver is
another open-source (GPL) archiver (originally developed
circa 1985) which features complete support for pax
interchange format.</p>

<p style="margin-left:8%; margin-top: 1em">This
documentation was written as part of the <b>libarchive</b>
and <b>bsdtar</b> project by Tim Kientzle
&lang;kientzle@@FreeBSD.org&rang;.</p>


<p style="margin-left:8%; margin-top: 1em">FreeBSD&nbsp;9.0
December&nbsp;27, 2009 FreeBSD&nbsp;9.0</p>
<hr>
</body>
</html>
@


1.1.1.4
log
@Import libarchive-2.8.4:
- Improved reliability of hash function detection
- Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix
@
text
@d1 1400
a1400 1657
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Wed Jun 30 11:55:53 2010
%%DocumentNeededResources: font Times-Roman
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 146
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Roman@@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q
(December 27, 2009 tar 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36
24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48
Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E
(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E
(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q
(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S
(ME).35 E(</h3>)36 36 Q(<b>tar</b>)0 48 Q 2.5(-f)0 60 S
(ormat of tape archi)-2.5 E .3 -.15(ve \214)-.25 H(les).15 E
(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q
(<b>tar</b>)0 48 Q(archi)0 60 Q .3 -.15(ve f)-.25 H(ormat collects an)
.15 E 2.5(yn)-.15 G(umber of \214les, directories, and other)-2.5 E
(\214le system objects \(symbolic links, de)0 72 Q
(vice nodes, etc.\) into a single)-.25 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(stream of bytes.)0 12 Q(The format w)0 24 Q
(as originally designed to be used with)-.1 E(tape dri)0 36 Q -.15(ve)
-.25 G 2.5(st).15 G(hat operate with \214x)-2.5 E(ed-size blocks, b)-.15
E(ut is widely used as)-.2 E 2.5(ag)0 48 S(eneral packaging mechanism.)
-2.5 E(<h4 id="General F)36 60 Q(ormat">)-.15 E(General F)36 72 Q(ormat)
-.15 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(A)0 24 Q(<b>tar</b>)0 36 Q(archi)0
48 Q .3 -.15(ve c)-.25 H(onsists of a series of 512-byte records.).15 E
(Each \214le system object requires a header record which stores basic \
metadata)0 60 Q(\(pathname, o)0 72 Q(wner)-.25 E 2.5(,p)-.4 G
(ermissions, etc.\) and zero or more records containing an)-2.5 E(y)-.15
E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214le data.)0 12 Q(The end of the archi)0 24 Q
.3 -.15(ve i)-.25 H 2.5(si).15 G(ndicated by tw)-2.5 E 2.5(or)-.1 G
(ecords consisting)-2.5 E(entirely of zero bytes.)0 36 Q(<p>)36 48 Q
-.15(Fo)0 60 S 2.5(rc).15 G(ompatibility with tape dri)-2.5 E -.15(ve)
-.25 G 2.5(st).15 G(hat use \214x)-2.5 E(ed block sizes,)-.15 E
(programs that read or write tar \214les al)0 72 Q -.1(wa)-.1 G
(ys read or write a \214x).1 E(ed)-.15 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(number of records with each I/O operation.)0 12
Q(These)0 24 Q -.74(``)0 36 S(blocks').74 E(')-.74 E(are al)0 48 Q -.1
(wa)-.1 G(ys a multiple of the record size.).1 E
(The maximum block size supported by early)0 60 Q(implementations w)0 72
Q(as 10240 bytes or 20 records.)-.1 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This is still the def)0 12 Q
(ault for most implementations)-.1 E
(although block sizes of 1MiB \(2048 records\) or lar)0 24 Q(ger are)
-.18 E(commonly used with modern high-speed tape dri)0 36 Q -.15(ve)-.25
G(s.).15 E(\(Note: the terms)0 48 Q -.74(``)0 60 S(block').74 E(')-.74 E
(and)0 72 Q 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(record').74 E(')-.74 E
(here are not entirely standard; this document follo)0 24 Q(ws the)-.25
E(con)0 36 Q -.15(ve)-.4 G
(ntion established by John Gilmore in documenting).15 E(<b>pdtar</b>.\))
0 48 Q(<h4 id="Old-Style Archi)36 60 Q .3 -.15(ve Fo)-.25 H(rmat">).15 E
(Old-Style Archi)36 72 Q .3 -.15(ve Fo)-.25 H(rmat).15 E 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(The original tar archi)0 24 Q .3
-.15(ve f)-.25 H(ormat has been e).15 E(xtended man)-.15 E 2.5(yt)-.15 G
(imes to)-2.5 E(include additional information that v)0 36 Q
(arious implementors found)-.25 E(necessary)0 48 Q(.)-.65 E
(This section describes the v)0 60 Q
(ariant implemented by the tar command)-.25 E(included in)0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)0 12 S(rsion 7 <code>A)1.11 E
(T&T UNIX</code>,)-1.11 E(which seems to be the earliest widely-used v)0
24 Q(ersion of the tar program.)-.15 E(<p>)36 36 Q
(The header record for an old-style)0 48 Q(<b>tar</b>)0 60 Q(archi)0 72
Q .3 -.15(ve c)-.25 H(onsists of the follo).15 E(wing:)-.25 E 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>)
0 36 Q(struct header_old_tar {)0 48 Q(char name[100];)36 60 Q
(char mode[8];)36 72 Q 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uid[8];)36 12 Q(char gid[8];)36 24 Q
(char size[12];)36 36 Q(char mtime[12];)36 48 Q(char checksum[8];)36 60
Q(char link\215ag[1];)36 72 Q 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char linkname[100];)36 12 Q(char pad[255];)36 24
Q(};)0 36 Q(</pre>)0 48 Q(</code>)0 60 Q(</dl>)0 72 Q 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(All unused bytes in the header record are \214lled with nulls.)0 12 Q
(<dl compact>)0 24 Q(<p><dt><i></i><i>name</i><dd>)0 36 Q -.15(Pa)0 48 S
(thname, stored as a null-terminated string.).15 E
(Early tar implementations only stored re)0 60 Q
(gular \214les \(including)-.15 E(hardlinks to those \214les\).)0 72 Q 0
Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(One common early con)0 12 Q -.15(ve)-.4 G
(ntion used a trailing "/" character to indicate).15 E 2.5(ad)0 24 S
(irectory name, allo)-2.5 E(wing directory permissions and o)-.25 E
(wner information)-.25 E(to be archi)0 36 Q -.15(ve)-.25 G 2.5(da).15 G
(nd restored.)-2.5 E(<p><dt><i></i><i>mode</i><dd>)0 48 Q
(File mode, stored as an octal number in ASCII.)0 60 Q
(<p><dt><i></i><i>uid</i><i></i>,<i> gid</i><dd>)0 72 Q 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(User id and group id of o)0 12 Q(wner)-.25 E 2.5
(,a)-.4 G 2.5(so)-2.5 G(ctal numbers in ASCII.)-2.5 E
(<p><dt><i></i><i>size</i><dd>)0 24 Q
(Size of \214le, as octal number in ASCII.)0 36 Q -.15(Fo)0 48 S 2.5(rr)
.15 G -.15(eg)-2.5 G(ular \214les only).15 E 2.5(,t)-.65 G
(his indicates the amount of data)-2.5 E(that follo)0 60 Q
(ws the header)-.25 E(.)-.55 E(In particular)0 72 Q 2.5(,t)-.4 G
(his \214eld w)-2.5 E(as ignored by early tar implementations)-.1 E 0 Cg
EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when e)0 12 Q(xtracting hardlinks.)-.15 E
(Modern writers should al)0 24 Q -.1(wa)-.1 G
(ys store a zero length for hardlink entries.).1 E
(<p><dt><i></i><i>mtime</i><dd>)0 36 Q
(Modi\214cation time of \214le, as an octal number in ASCII.)0 48 Q
(This indicates the number of seconds since the start of the epoch,)0 60
Q(00:00:00 UTC January 1, 1970.)0 72 Q 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Note that ne)0 12 Q -.05(ga)-.15 G(ti).05 E .3
-.15(ve v)-.25 H(alues should be a)-.1 E -.2(vo)-.2 G(ided).2 E
(here, as the)0 24 Q 2.5(ya)-.15 G(re handled inconsistently)-2.5 E(.)
-.65 E(<p><dt><i></i><i>checksum</i><dd>)0 36 Q
(Header checksum, stored as an octal number in ASCII.)0 48 Q 1.6 -.8
(To c)0 60 T
(ompute the checksum, set the checksum \214eld to all spaces,).8 E
(then sum all bytes in the header using unsigned arithmetic.)0 72 Q 0 Cg
EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(This \214eld should be stored as six octal digits follo)0 12 Q
(wed by a null and a space)-.25 E(character)0 24 Q(.)-.55 E
(Note that man)0 36 Q 2.5(ye)-.15 G
(arly implementations of tar used signed arithmetic)-2.5 E
(for the checksum \214eld, which can cause interoperability problems)0
48 Q(when transferring archi)0 60 Q -.15(ve)-.25 G 2.5(sb).15 G
(etween systems.)-2.5 E(Modern rob)0 72 Q
(ust readers compute the checksum both w)-.2 E(ays and accept the)-.1 E
0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(header if either computation matches.)0 12 Q
(<p><dt><i></i><i>link\215ag</i><i></i>,<i> linkname</i><dd>)0 24 Q
(In order to preserv)0 36 Q 2.5(eh)-.15 G(ardlinks and conserv)-2.5 E
2.5(et)-.15 G(ape, a \214le)-2.5 E
(with multiple links is only written to the archi)0 48 Q .3 -.15(ve t)
-.25 H(he \214rst).15 E(time it is encountered.)0 60 Q(The ne)0 72 Q
(xt time it is encountered, the)-.15 E 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<i></i><i>link\215ag</i>)0 12 Q
(is set to an ASCII)0 24 Q(`1')0 36 Q(and the)0 48 Q
(<i></i><i>linkname</i>)0 60 Q
(\214eld holds the \214rst name under which this \214le appears.)0 72 Q
0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(Note that re)0 12 Q(gular \214les ha)-.15 E .3
-.15(ve a n)-.2 H(ull v).15 E(alue in the)-.25 E
(<i></i><i>link\215ag</i>)0 24 Q(\214eld.\))0 36 Q(</dl>)0 48 Q(<p>)36
60 Q(Early tar implementations v)0 72 Q(aried in ho)-.25 E 2.5(wt)-.25 G
(he)-2.5 E 2.5(yt)-.15 G(erminated these \214elds.)-2.5 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The tar command in)0 12 Q -1.11(Ve)0 24 S
(rsion 7 <code>A)1.11 E(T&T UNIX</code>)-1.11 E(used the follo)0 36 Q
(wing con)-.25 E -.15(ve)-.4 G
(ntions \(this is also documented in early BSD manpages\):).15 E
(the pathname must be null-terminated;)0 48 Q
(the mode, uid, and gid \214elds must end in a space and a null byte;)0
60 Q(the size and mtime \214elds must end in a space;)0 72 Q 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(the checksum is terminated by a null and a space.)0 12 Q(Early impleme\
ntations \214lled the numeric \214elds with leading spaces.)0 24 Q
(This seems to ha)0 36 Q .3 -.15(ve b)-.2 H
(een common practice until the).15 E(IEEE Std 1003.1-1988 \(`)2.5 48 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(standard w)0 60 Q
(as released.)-.1 E -.15(Fo)0 72 S 2.5(rb).15 G(est portability)-2.5 E
2.5(,m)-.65 G(odern implementations should \214ll the numeric)-2.5 E 0
Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214elds with leading zeros.)0 12 Q
(<h4 id="Pre-POSIX Archi)36 24 Q -.15(ve)-.25 G(s">).15 E
(Pre-POSIX Archi)36 36 Q -.15(ve)-.25 G(s).15 E(</h4>)36 48 Q
(An early draft of)0 60 Q(IEEE Std 1003.1-1988 \(`)2.5 72 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E 0 Cg EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(serv)0 12 Q(ed as the basis for John Gilmore')
-.15 E(s)-.55 E(<b>pdtar</b>)0 24 Q(program and man)0 36 Q 2.5(ys)-.15 G
(ystem implementations from the late 1980s)-2.5 E(and early 1990s.)0 48
Q(These archi)0 60 Q -.15(ve)-.25 G 2.5(sg).15 G(enerally follo)-2.5 E
2.5(wt)-.25 G(he POSIX ustar)-2.5 E(format described belo)0 72 Q 2.5(ww)
-.25 G(ith the follo)-2.5 E(wing v)-.25 E(ariations:)-.25 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<ul>)0 12 Q(<li>)0 24 Q(The magic v)0 36 Q
(alue is)-.25 E -.74(``)0 48 S(ustar ').74 E(')-.74 E(\(note the follo)0
60 Q(wing space\).)-.25 E(The v)0 72 Q
(ersion \214eld contains a space character follo)-.15 E(wed by a null.)
-.25 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q
(The numeric \214elds are generally \214lled with leading spaces)0 24 Q
(\(not leading zeros as recommended in the \214nal standard\).)0 36 Q
(<li>)0 48 Q
(The pre\214x \214eld is often not used, limiting pathnames to)0 60 Q
(the 100 characters of old-style archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0
Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</ul>)0 12 Q(<h4 id="POSIX ustar Archi)36 24 Q
-.15(ve)-.25 G(s">).15 E(POSIX ustar Archi)36 36 Q -.15(ve)-.25 G(s).15
E(</h4>)36 48 Q(IEEE Std 1003.1-1988 \(`)2.5 60 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E
(de\214ned a standard tar \214le format to be read and written)0 72 Q 0
Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(by compliant implementations of)0 12 Q
(<a href="../html1/tar)0 24 Q(.html">tar\(1\)</a>.)-.55 E
(This format is often called the)0 36 Q -.74(``)0 48 S(ustar').74 E(')
-.74 E(format, after the magic v)0 60 Q(alue used)-.25 E(in the header)0
72 Q(.)-.55 E 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(The name is an acron)0 12 Q(ym for)-.15 E -.74
(``)0 24 S(Unix Standard T).74 E(AR')-.93 E('.\))-.74 E(It e)0 36 Q
(xtends the historic format with ne)-.15 E 2.5<778c>-.25 G(elds:)-2.5 E
(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(struct header_posix_ustar {)0 12 Q
(char name[100];)36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q
(char gid[8];)36 60 Q(char size[12];)36 72 Q 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24
Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q
(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q
(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E
(char pre\214x[155];)36 60 Q(char pad[12];)36 72 Q 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(};)0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0
48 Q(<dl compact>)0 60 Q(<p><dt><i></i><i>type\215ag</i><dd>)0 72 Q 0 Cg
EP
%%Page: 39 39
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.8(Ty)0 12 S(pe of entry).8 E(.)-.65 E(POSIX e)
0 24 Q(xtended the earlier)-.15 E(<i></i><i>link\215ag</i>)0 36 Q
(\214eld with se)0 48 Q -.15(ve)-.25 G(ral ne).15 E 2.5(wt)-.25 G(ype v)
-2.5 E(alues:)-.25 E(<dl compact>)0 60 Q(<dt>`)0 72 Q(`0')-.74 E('<dd>)
-.74 E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Re)0 12 Q(gular \214le.)-.15 E
(NUL should be treated as a synon)0 24 Q
(ym, for compatibility purposes.)-.15 E(<dt>`)0 36 Q(`1')-.74 E('<dd>)
-.74 E(Hard link.)0 48 Q(<dt>`)0 60 Q(`2')-.74 E('<dd>)-.74 E
(Symbolic link.)0 72 Q 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dt>`)0 12 Q(`3')-.74 E('<dd>)-.74 E
(Character de)0 24 Q(vice node.)-.25 E(<dt>`)0 36 Q(`4')-.74 E('<dd>)
-.74 E(Block de)0 48 Q(vice node.)-.25 E(<dt>`)0 60 Q(`5')-.74 E('<dd>)
-.74 E(Directory)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dt>`)0 12 Q(`6')-.74 E('<dd>)-.74 E(FIFO node.)
0 24 Q(<dt>`)0 36 Q(`7')-.74 E('<dd>)-.74 E(Reserv)0 48 Q(ed.)-.15 E
(<dt>Other<dd>)0 60 Q 2.5(AP)0 72 S
(OSIX-compliant implementation must treat an)-2.5 E 2.5(yu)-.15 G
(nrecognized type\215ag v)-2.5 E(alue)-.25 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(as a re)0 12 Q(gular \214le.)-.15 E
(In particular)0 24 Q 2.5(,w)-.4 G
(riters should ensure that all entries)-2.5 E(ha)0 36 Q .3 -.15(ve a v)
-.2 H(alid \214lename so that the)-.1 E 2.5(yc)-.15 G
(an be restored by readers that do not)-2.5 E
(support the corresponding e)0 48 Q(xtension.)-.15 E
(Uppercase letters "A" through "Z" are reserv)0 60 Q(ed for custom e)
-.15 E(xtensions.)-.15 E(Note that sock)0 72 Q
(ets and whiteout entries are not archi)-.1 E -.25(va)-.25 G(ble.).25 E
0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</dl>)0 12 Q(It is w)0 24 Q
(orth noting that the)-.1 E(<i></i><i>size</i>)0 36 Q
(\214eld, in particular)0 48 Q 2.5(,h)-.4 G(as dif)-2.5 E
(ferent meanings depending on the type.)-.25 E -.15(Fo)0 60 S 2.5(rr).15
G -.15(eg)-2.5 G
(ular \214les, of course, it indicates the amount of data).15 E(follo)0
72 Q(wing the header)-.25 E(.)-.55 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(Fo)0 12 S 2.5(rd).15 G
(irectories, it may be used to indicate the total size of all)-2.5 E
(\214les in the directory)0 24 Q 2.5(,f)-.65 G
(or use by operating systems that pre-allocate)-2.5 E(directory space.)0
36 Q -.15(Fo)0 48 S 2.5(ra).15 G
(ll other types, it should be set to zero by writers and ignored)-2.5 E
(by readers.)0 60 Q(<p><dt><i></i><i>magic</i><dd>)0 72 Q 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Contains the magic v)0 12 Q(alue)-.25 E -.74(``)
0 24 S(ustar').74 E(')-.74 E(follo)0 36 Q
(wed by a NUL byte to indicate that this is a POSIX standard archi)-.25
E -.15(ve)-.25 G(.).15 E
(Full compliance requires the uname and gname \214elds be properly set.)
0 48 Q(<p><dt><i></i><i>v)0 60 Q(ersion</i><dd>)-.15 E -1.11(Ve)0 72 S
(rsion.)1.11 E 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This should be)0 12 Q -.74(``)0 24 S(00').74 E
(')-.74 E(\(tw)0 36 Q 2.5(oc)-.1 G
(opies of the ASCII digit zero\) for POSIX standard archi)-2.5 E -.15
(ve)-.25 G(s.).15 E(<p><dt><i></i><i>uname</i><i></i>,<i> gname</i><dd>)
0 48 Q(User and group names, as null-terminated ASCII strings.)0 60 Q
(These should be used in preference to the uid/gid v)0 72 Q(alues)-.25 E
0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when the)0 12 Q 2.5(ya)-.15 G
(re set and the corresponding names e)-2.5 E(xist on)-.15 E(the system.)
0 24 Q(<p><dt><i></i><i>de)0 36 Q(vmajor</i><i></i>,<i> de)-.25 E
(vminor</i><dd>)-.25 E(Major and minor numbers for character de)0 48 Q
(vice or block de)-.25 E(vice entry)-.25 E(.)-.65 E
(<p><dt><i></i><i>name</i><i></i>,<i> pre\214x</i><dd>)0 60 Q
(If the pathname is too long to \214t in the 100 bytes pro)0 72 Q
(vided by the standard)-.15 E 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(format, it can be split at an)0 12 Q(y)-.15 E
(<code></code><code>/</code>)0 24 Q
(character with the \214rst portion going into the pre\214x \214eld.)0
36 Q(If the pre\214x \214eld is not empty)0 48 Q 2.5(,t)-.65 G
(he reader will prepend)-2.5 E(the pre\214x v)0 60 Q(alue and a)-.25 E
(<code></code><code>/</code>)0 72 Q 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(character to the re)0 12 Q
(gular name \214eld to obtain the full pathname.)-.15 E
(The standard does not require a trailing)0 24 Q
(<code></code><code>/</code>)0 36 Q
(character on directory names, though most implementations still)0 48 Q
(include this for compatibility reasons.)0 60 Q(</dl>)0 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q
(Note that all unused bytes must be set to)0 24 Q
(<code></code><code>NUL</code>.)0 36 Q(<p>)36 48 Q
(Field termination is speci\214ed slightly dif)0 60 Q(ferently by POSIX)
-.25 E(than by pre)0 72 Q(vious implementations.)-.25 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q(<i></i><i>magic</i>,)0 24 Q
(<i></i><i>uname</i>,)0 36 Q(and)0 48 Q(<i></i><i>gname</i>)0 60 Q
(\214elds must ha)0 72 Q .3 -.15(ve a t)-.2 H(railing).15 E 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<code></code><code>NUL</code>.)0 12 Q(The)0 24 Q
(<i></i><i>pathname</i>,)0 36 Q(<i></i><i>linkname</i>,)0 48 Q(and)0 60
Q(<i></i><i>pre\214x</i>)0 72 Q 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214elds must ha)0 12 Q .3 -.15(ve a t)-.2 H
(railing).15 E(<code></code><code>NUL</code>)0 24 Q(unless the)0 36 Q
2.5<798c>-.15 G(ll the entire \214eld.)-2.5 E(\(In particular)0 48 Q 2.5
(,i)-.4 G 2.5(ti)-2.5 G 2.5(sp)-2.5 G
(ossible to store a 256-character pathname if it)-2.5 E(happens to ha)0
60 Q .3 -.15(ve a)-.2 H(<code></code><code>/</code>)0 72 Q 0 Cg EP
%%Page: 55 55
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(as the 156th character)0 12 Q(.\))-.55 E(POSIX \
requires numeric \214elds to be zero-padded in the front, and requires)0
24 Q(them to be terminated with either space or)0 36 Q
(<code></code><code>NUL</code>)0 48 Q(characters.)0 60 Q(<p>)36 72 Q 0
Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Currently)0 12 Q 2.5(,m)-.65 G
(ost tar implementations comply with the ustar)-2.5 E
(format, occasionally e)0 24 Q(xtending it by adding ne)-.15 E 2.5<778c>
-.25 G(elds to the)-2.5 E(blank area at the end of the header record.)0
36 Q(<h4 id="P)36 48 Q(ax Interchange F)-.15 E(ormat">)-.15 E -.15(Pa)36
60 S 2.5(xI).15 G(nterchange F)-2.5 E(ormat)-.15 E(</h4>)36 72 Q 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are man)0 12 Q 2.5(ya)-.15 G(ttrib)-2.5 E
(utes that cannot be portably stored in a)-.2 E(POSIX ustar archi)0 24 Q
-.15(ve)-.25 G(.).15 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(de\214ned a)0 48 Q
-.74(``)0 60 S(pax interchange format').74 E(')-.74 E(that uses tw)0 72
Q 2.5(on)-.1 G .5 -.25(ew t)-2.5 H(ypes of entries to hold te).25 E
(xt-formatted)-.15 E 0 Cg EP
%%Page: 58 58
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(metadata that applies to follo)0 12 Q
(wing entries.)-.25 E(Note that a pax interchange format archi)0 24 Q .3
-.15(ve i)-.25 H 2.5(sau).15 G(star archi)-2.5 E .3 -.15(ve i)-.25 H 2.5
(ne).15 G -.15(ve)-2.75 G(ry).15 E(respect.)0 36 Q(The ne)0 48 Q 2.5(wd)
-.25 G(ata is stored in ustar)-2.5 E(-compatible archi)-.2 E .3 -.15
(ve e)-.25 H(ntries that use the).15 E -.74(``)0 60 S(x').74 E(')-.74 E
(or)0 72 Q 0 Cg EP
%%Page: 59 59
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(g').74 E(')-.74 E(type\215ag.)0
24 Q(In particular)0 36 Q 2.5(,o)-.4 G
(lder implementations that do not fully support these)-2.5 E -.15(ex)0
48 S(tensions will e).15 E(xtract the metadata into re)-.15 E
(gular \214les, where the)-.15 E(metadata can be e)0 60 Q
(xamined as necessary)-.15 E(.)-.65 E(<p>)36 72 Q 0 Cg EP
%%Page: 60 60
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An entry in a pax interchange format archi)0 12
Q .3 -.15(ve c)-.25 H(onsists of one or).15 E(tw)0 24 Q 2.5(os)-.1 G
(tandard ustar entries, each with its o)-2.5 E(wn header and data.)-.25
E(The \214rst optional entry stores the e)0 36 Q(xtended attrib)-.15 E
(utes)-.2 E(for the follo)0 48 Q(wing entry)-.25 E(.)-.65 E(This option\
al \214rst entry has an "x" type\215ag and a size \214eld that)0 60 Q
(indicates the total size of the e)0 72 Q(xtended attrib)-.15 E(utes.)
-.2 E 0 Cg EP
%%Page: 61 61
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The e)0 12 Q(xtended attrib)-.15 E
(utes themselv)-.2 E(es are stored as a series of te)-.15 E(xt-format)
-.15 E(lines encoded in the portable UTF-8 encoding.)0 24 Q
(Each line consists of a decimal number)0 36 Q 2.5(,as)-.4 G(pace, a k)
-2.5 E .3 -.15(ey s)-.1 H(tring, an equals).15 E(sign, a v)0 48 Q
(alue string, and a ne)-.25 E 2.5(wl)-.25 G(ine.)-2.5 E(The decimal num\
ber indicates the length of the entire line, including the)0 60 Q
(initial length \214eld and the trailing ne)0 72 Q(wline.)-.25 E 0 Cg EP
%%Page: 62 62
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An e)0 12 Q(xample of such a \214eld is:)-.15 E
(<br>)0 24 Q(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)0 36 Q
(<code></code><code>25</code><code> ctime=1084839148.1212\\n</code>)0 48
Q(<br>)0 60 Q -2.15 -.25(Ke y)0 72 T 2.5(si).25 G 2.5(na)-2.5 G(ll lo)
-2.5 E(wercase are standard k)-.25 E -.15(ey)-.1 G(s.).15 E 0 Cg EP
%%Page: 63 63
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)0 12 S(ndors can add their o)1.11 E
(wn k)-.25 E -.15(ey)-.1 G 2.5(sb).15 G 2.5(yp)-2.5 G
(re\214xing them with an all uppercase)-2.5 E -.15(ve)0 24 S
(ndor name and a period.).15 E(Note that, unlik)0 36 Q 2.5(et)-.1 G
(he historic header)-2.5 E 2.5(,n)-.4 G(umeric v)-2.5 E
(alues are stored using)-.25 E(decimal, not octal.)0 48 Q 2.5(Ad)0 60 S
(escription of some common k)-2.5 E -.15(ey)-.1 G 2.5(sf).15 G(ollo)-2.5
E(ws:)-.25 E(<dl compact>)0 72 Q 0 Cg EP
%%Page: 64 64
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>atime</b><b></b>,<b> ctime</b>\
<b></b>,<b> mtime</b><dd>)0 12 Q
(File access, inode change, and modi\214cation times.)0 24 Q
(These \214elds can be ne)0 36 Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve o)
-.25 H 2.5(ri).15 G(nclude a decimal point and a fractional v)-2.5 E
(alue.)-.25 E(<p><dt><b></b><b>uname</b><b></b>,<b> uid</b><b></b>,<b> \
gname</b><b></b>,<b> gid</b><dd>)0 48 Q
(User name, group name, and numeric UID and GID v)0 60 Q(alues.)-.25 E
(The user name and group name stored here are encoded in UTF8)0 72 Q 0
Cg EP
%%Page: 65 65
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and can thus include non-ASCII characters.)0 12
Q(The UID and GID \214elds can be of arbitrary length.)0 24 Q
(<p><dt><b></b><b>linkpath</b><dd>)0 36 Q(The full path of the link)0 48
Q(ed-to \214le.)-.1 E(Note that this is encoded in UTF8 and can thus in\
clude non-ASCII characters.)0 60 Q(<p><dt><b></b><b>path</b><dd>)0 72 Q
0 Cg EP
%%Page: 66 66
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The full pathname of the entry)0 12 Q(.)-.65 E(\
Note that this is encoded in UTF8 and can thus include non-ASCII charac\
ters.)0 24 Q(<p><dt><b></b><b>realtime.*</b><b></b>,<b> security)0 36 Q
(.*</b><dd>)-.65 E(These k)0 48 Q -.15(ey)-.1 G 2.5(sa).15 G(re reserv)
-2.5 E(ed and may be used for future standardization.)-.15 E
(<p><dt><b></b><b>size</b><dd>)0 60 Q(The size of the \214le.)0 72 Q 0
Cg EP
%%Page: 67 67
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(Note that there is no length limit on this \214eld, allo)0 12 Q
(wing conforming)-.25 E(archi)0 24 Q -.15(ve)-.25 G 2.5(st).15 G 2.5(os)
-2.5 G(tore \214les much lar)-2.5 E(ger than the historic 8GB limit.)
-.18 E(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(*</b><dd>)1.29 E
-1.11(Ve)0 48 S(ndor)1.11 E(-speci\214c attrib)-.2 E(utes used by Joer)
-.2 E 2.5(gS)-.18 G(chilling')-2.5 E(s)-.55 E(<b>star</b>)0 60 Q
(implementation.)0 72 Q 0 Cg EP
%%Page: 68 68
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G
(acl.access</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(acl.def)1.29 E
(ault</b><dd>)-.1 E(Stores the access and def)0 24 Q(ault A)-.1 E
(CLs as te)-.4 E(xtual strings in a format)-.15 E(that is an e)0 36 Q
(xtension of the format speci\214ed by POSIX.1e draft 17.)-.15 E
(In particular)0 48 Q 2.5(,e)-.4 G
(ach user or group access speci\214cation can include a fourth)-2.5 E
(colon-separated \214eld with the numeric UID or GID.)0 60 Q(This allo)0
72 Q(ws A)-.25 E(CLs to be restored on systems that may not ha)-.4 E .3
-.15(ve c)-.2 H(omplete).15 E 0 Cg EP
%%Page: 69 69
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(user or group information a)0 12 Q -.25(va)-.2 G
(ilable \(such as when NIS/YP or LD).25 E(AP services)-.4 E
(are temporarily una)0 24 Q -.25(va)-.2 G(ilable\).).25 E
(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(de)1.29 E
(vminor</b><b></b>,<b> SCHIL)-.25 E -1.29(Y.)-1 G(de)1.29 E
(vmajor</b><dd>)-.25 E(The full minor and major numbers for de)0 48 Q
(vice nodes.)-.25 E(<p><dt><b></b><b>SCHIL)0 60 Q -1.29(Y.)-1 G -.25
<668d>1.29 G(ags</b><dd>).25 E(The \214le \215ags.)0 72 Q 0 Cg EP
%%Page: 70 70
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G
(realsize</b><dd>)1.29 E(The full size of the \214le on disk.)0 24 Q
(XXX e)0 36 Q(xplain? XXX)-.15 E(<p><dt><b></b><b>SCHIL)0 48 Q -1.29(Y.)
-1 G(de)1.29 E -.65(v,)-.25 G(</b><b></b><b> SCHIL).65 E -1.29(Y.)-1 G
(ino</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(nlinks</b><dd>)1.29 E
(The de)0 60 Q(vice number)-.25 E 2.5(,i)-.4 G(node number)-2.5 E 2.5
(,a)-.4 G(nd link count for the entry)-2.5 E(.)-.65 E(In particular)0 72
Q 2.5(,n)-.4 G(ote that a pax interchange format archi)-2.5 E .3 -.15
(ve u)-.25 H(sing Joer).15 E(g)-.18 E 0 Cg EP
%%Page: 71 71
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(Schilling')0 12 Q(s)-.55 E(<b></b><b>SCHIL)0 24
Q -1.29(Y.)-1 G(*</b>)1.29 E -.15(ex)0 36 S
(tensions can store all of the data from).15 E
(<i></i><i>struct</i><i> stat</i>.)0 48 Q(<p><dt><b></b><b>LIB)0 60 Q
(ARCHIVE.xattr)-.35 E(.</b><i></i><i>namespace</i><i></i>.<i>k)-.55 E
-.15(ey)-.1 G(</i><dd>).15 E(Libarchi)0 72 Q .3 -.15(ve s)-.25 H
(tores POSIX.1e-style e).15 E(xtended attrib)-.15 E(utes using)-.2 E 0
Cg EP
%%Page: 72 72
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.1(ke)0 12 S(ys of this form.)-.05 E(The)0 24 Q
(<i></i><i>k)0 36 Q -.15(ey)-.1 G(</i>).15 E -.25(va)0 48 S
(lue is URL-encoded:).25 E(All non-ASCII characters and the tw)0 60 Q
2.5(os)-.1 G(pecial characters)-2.5 E -.74(``)0 72 S(=').74 E(')-.74 E 0
Cg EP
%%Page: 73 73
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q -.74(``)0 24 S(%').74 E(')-.74 E
(are encoded as)0 36 Q -.74(``)0 48 S(%').74 E(')-.74 E(follo)0 60 Q
(wed by tw)-.25 E 2.5(ou)-.1 G(ppercase he)-2.5 E(xadecimal digits.)-.15
E(The v)0 72 Q(alue of this k)-.25 E .3 -.15(ey i)-.1 H 2.5(st).15 G
(he e)-2.5 E(xtended attrib)-.15 E(ute v)-.2 E(alue)-.25 E 0 Cg EP
%%Page: 74 74
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(encoded in base 64.)0 12 Q
(XXX Detail the base-64 format here XXX)0 24 Q
(<p><dt><b></b><b>VENDOR.*</b><dd>)0 36 Q(XXX document other v)0 48 Q
(endor)-.15 E(-speci\214c e)-.2 E(xtensions XXX)-.15 E(</dl>)0 60 Q(<p>)
36 72 Q 0 Cg EP
%%Page: 75 75
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(An)0 12 Q 2.5(yv)-.15 G(alues stored in an e)
-2.75 E(xtended attrib)-.15 E(ute o)-.2 E -.15(ve)-.15 G
(rride the corresponding).15 E -.25(va)0 24 S(lues in the re).25 E
(gular tar header)-.15 E(.)-.55 E
(Note that compliant readers should ignore the re)0 36 Q
(gular \214elds when the)-.15 E(y)-.15 E(are o)0 48 Q -.15(ve)-.15 G
(rridden.).15 E(This is important, as e)0 60 Q(xisting archi)-.15 E -.15
(ve)-.25 G(rs are kno).15 E(wn to store non-compliant)-.25 E -.25(va)0
72 S(lues in the standard header \214elds in this situation.).25 E 0 Cg
EP
%%Page: 76 76
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(There are no limits on length for an)0 12 Q 2.5
(yo)-.15 G 2.5(ft)-2.5 G(hese \214elds.)-2.5 E(In particular)0 24 Q 2.5
(,n)-.4 G(umeric \214elds can be arbitrarily lar)-2.5 E(ge.)-.18 E
(All te)0 36 Q(xt \214elds are encoded in UTF8.)-.15 E
(Compliant writers should store only portable 7-bit ASCII characters in)
0 48 Q(the standard ustar header and use e)0 60 Q(xtended)-.15 E(attrib)
0 72 Q(utes whene)-.2 E -.15(ve)-.25 G 2.5(rat).15 G -.15(ex)-2.5 G 2.5
(tv).15 G(alue contains non-ASCII characters.)-2.75 E 0 Cg EP
%%Page: 77 77
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(In addition to the)0 24 Q
(<b></b><b>x</b>)0 36 Q(entry described abo)0 48 Q -.15(ve)-.15 G 2.5
(,t).15 G(he pax interchange format)-2.5 E(also supports a)0 60 Q
(<b></b><b>g</b>)0 72 Q 0 Cg EP
%%Page: 78 78
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(entry)0 12 Q(.)-.65 E(The)0 24 Q
(<b></b><b>g</b>)0 36 Q(entry is identical in format, b)0 48 Q
(ut speci\214es attrib)-.2 E(utes that serv)-.2 E 2.5(ea)-.15 G(s)-2.5 E
(def)0 60 Q(aults for all subsequent archi)-.1 E .3 -.15(ve e)-.25 H
(ntries.).15 E(The)0 72 Q 0 Cg EP
%%Page: 79 79
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>g</b>)0 12 Q
(entry is not widely used.)0 24 Q(<p>)36 36 Q(Besides the ne)0 48 Q(w)
-.25 E(<b></b><b>x</b>)0 60 Q(and)0 72 Q 0 Cg EP
%%Page: 80 80
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>g</b>)0 12 Q
(entries, the pax interchange format has a fe)0 24 Q 2.5(wo)-.25 G
(ther minor v)-2.5 E(ariations)-.25 E(from the earlier ustar format.)0
36 Q(The most troubling one is that hardlinks are permitted to ha)0 48 Q
-.15(ve)-.2 G(data follo)0 60 Q(wing them.)-.25 E(This allo)0 72 Q
(ws readers to restore an)-.25 E 2.5(yh)-.15 G
(ardlink to a \214le without)-2.5 E 0 Cg EP
%%Page: 81 81
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ha)0 12 Q(ving to re)-.2 E(wind the archi)-.25 E
.3 -.15(ve t)-.25 H 2.5<6f8c>.15 G(nd an earlier entry)-2.5 E(.)-.65 E
(Ho)0 24 Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(tc).4 G
(reates complications for rob)-2.5 E(ust readers, as it is no longer)-.2
E(clear whether or not the)0 36 Q 2.5(ys)-.15 G
(hould ignore the size \214eld for hardlink entries.)-2.5 E
(<h4 id="GNU T)36 48 Q(ar Archi)-.8 E -.15(ve)-.25 G(s">).15 E(GNU T)36
60 Q(ar Archi)-.8 E -.15(ve)-.25 G(s).15 E(</h4>)36 72 Q 0 Cg EP
%%Page: 82 82
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(The GNU tar program started with a pre-POSIX format similar to that)0
12 Q(described earlier and has e)0 24 Q(xtended it using se)-.15 E -.15
(ve)-.25 G(ral dif).15 E(ferent mechanisms:)-.25 E(It added ne)0 36 Q
2.5<778c>-.25 G(elds to the empty space in the header \(some of which w)
-2.5 E(as later)-.1 E(used by POSIX for con\215icting purposes\);)0 48 Q
(it allo)0 60 Q(wed the header to be continued o)-.25 E -.15(ve)-.15 G
2.5(rm).15 G(ultiple records;)-2.5 E(and it de\214ned ne)0 72 Q 2.5(we)
-.25 G(ntries that modify follo)-2.5 E(wing entries)-.25 E 0 Cg EP
%%Page: 83 83
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(similar in principle to the)0 12 Q
(<b></b><b>x</b>)0 24 Q(entry described abo)0 36 Q -.15(ve)-.15 G 2.5
(,b).15 G(ut each GNU special entry is single-purpose,)-2.7 E(unlik)0 48
Q 2.5(et)-.1 G(he general-purpose)-2.5 E(<b></b><b>x</b>)0 60 Q
(entry\).)0 72 Q 0 Cg EP
%%Page: 84 84
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(As a result, GNU tar archi)0 12 Q -.15(ve)-.25 G
2.5(sa).15 G(re not POSIX compatible, although)-2.5 E
(more lenient POSIX-compliant readers can successfully e)0 24 Q
(xtract most)-.15 E(GNU tar archi)0 36 Q -.15(ve)-.25 G(s.).15 E
(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP
%%Page: 85 85
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(struct header_gnu_tar {)0 12 Q(char name[100];)
36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q(char gid[8];)36 60 Q
(char size[12];)36 72 Q 0 Cg EP
%%Page: 86 86
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24
Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q
(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP
%%Page: 87 87
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q
(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E
(char atime[12];)36 60 Q(char ctime[12];)36 72 Q 0 Cg EP
%%Page: 88 88
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char of)36 12 Q(fset[12];)-.25 E
(char longnames[4];)36 24 Q(char unused[1];)36 36 Q(struct {)36 48 Q
(char of)72 60 Q(fset[12];)-.25 E(char numbytes[12];)72 72 Q 0 Cg EP
%%Page: 89 89
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF 2.5(}s)36 12 S(parse[4];)-2.5 E(char ise)36 24 Q
(xtended[1];)-.15 E(char realsize[12];)36 36 Q(char pad[17];)36 48 Q(};)
0 60 Q(</pre>)0 72 Q 0 Cg EP
%%Page: 90 90
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<dl compact>)0 36 Q
(<p><dt><i></i><i>type\215ag</i><dd>)0 48 Q(GNU tar uses the follo)0 60
Q(wing special entry types, in addition to)-.25 E
(those de\214ned by POSIX:)0 72 Q 0 Cg EP
%%Page: 91 91
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<dl compact>)0 12 Q(<p><dt>7<dd>)0 24 Q
(GNU tar treats type "7" records identically to type "0" records,)0 36 Q
-.15(ex)0 48 S(cept on one obscure R).15 E -.18(TO)-.6 G 2.5(Sw).18 G
(here the)-2.5 E 2.5(ya)-.15 G(re used to indicate the)-2.5 E
(pre-allocation of a contiguous \214le on disk.)0 60 Q(<p><dt>D<dd>)0 72
Q 0 Cg EP
%%Page: 92 92
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This indicates a directory entry)0 12 Q(.)-.65 E
(Unlik)0 24 Q 2.5(et)-.1 G(he POSIX-standard "5")-2.5 E
(type\215ag, the header is follo)0 36 Q
(wed by data records listing the names)-.25 E
(of \214les in this directory)0 48 Q(.)-.65 E
(Each name is preceded by an ASCII "Y")0 60 Q
(if the \214le is stored in this archi)0 72 Q .3 -.15(ve o)-.25 H 2.5
(r").15 G(N" if the \214le is not)-2.5 E 0 Cg EP
%%Page: 93 93
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(stored in this archi)0 12 Q -.15(ve)-.25 G(.).15
E(Each name is terminated with a null, and)0 24 Q(an e)0 36 Q
(xtra null marks the end of the name list.)-.15 E(The purpose of this)0
48 Q(entry is to support incremental backups; a program restoring from)0
60 Q(such an archi)0 72 Q .3 -.15(ve m)-.25 H
(ay wish to delete \214les on disk that did not e).15 E(xist)-.15 E 0 Cg
EP
%%Page: 94 94
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in the directory when the archi)0 12 Q .3 -.15
(ve w)-.25 H(as made.).05 E(<p>)36 24 Q(Note that the "D" type\215ag sp\
eci\214cally violates POSIX, which requires)0 36 Q
(that unrecognized type\215ags be restored as normal \214les.)0 48 Q
(In this case, restoring the "D" entry as a \214le could interfere)0 60
Q(with subsequent creation of the lik)0 72 Q(e-named directory)-.1 E(.)
-.65 E 0 Cg EP
%%Page: 95 95
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt>K<dd>)0 12 Q
(The data for this entry is a long linkname for the follo)0 24 Q
(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>L<dd>)0 36 Q
(The data for this entry is a long pathname for the follo)0 48 Q
(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>M<dd>)0 60 Q
(This is a continuation of the last \214le on the pre)0 72 Q(vious v)
-.25 E(olume.)-.2 E 0 Cg EP
%%Page: 96 96
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(GNU multi-v)0 12 Q(olume archi)-.2 E -.15(ve)
-.25 G 2.5(sg).15 G(uarantee that each v)-2.5 E(olume be)-.2 E
(gins with a v)-.15 E(alid)-.25 E(entry header)0 24 Q(.)-.55 E 1.6 -.8
(To e)0 36 T(nsure this, a \214le may be split, with part stored at the\
 end of one v).8 E(olume,)-.2 E(and part stored at the be)0 48 Q
(ginning of the ne)-.15 E(xt v)-.15 E(olume.)-.2 E
(The "M" type\215ag indicates that this entry continues an e)0 60 Q
(xisting \214le.)-.15 E
(Such entries can only occur as the \214rst or second entry)0 72 Q 0 Cg
EP
%%Page: 97 97
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(in an archi)0 12 Q .3 -.15(ve \()-.25 H
(the latter only if the \214rst entry is a v).15 E(olume label\).)-.2 E
(The)0 24 Q(<i></i><i>size</i>)0 36 Q
(\214eld speci\214es the size of this entry)0 48 Q(.)-.65 E(The)0 60 Q
(<i></i><i>of)0 72 Q(fset</i>)-.25 E 0 Cg EP
%%Page: 98 98
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214eld at bytes 369-380 speci\214es the of)0 12
Q(fset where this \214le fragment)-.25 E(be)0 24 Q(gins.)-.15 E(The)0 36
Q(<i></i><i>realsize</i>)0 48 Q
(\214eld speci\214es the total size of the \214le \(which must equal)0
60 Q(<i></i><i>size</i>)0 72 Q 0 Cg EP
%%Page: 99 99
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(plus)0 12 Q(<i></i><i>of)0 24 Q(fset</i>\).)-.25
E(When e)0 36 Q
(xtracting, GNU tar checks that the header \214le name is the one it is)
-.15 E -.15(ex)0 48 S(pecting, that the header of).15 E
(fset is in the correct sequence, and that)-.25 E(the sum of of)0 60 Q
(fset and size is equal to realsize.)-.25 E(<p><dt>N<dd>)0 72 Q 0 Cg EP
%%Page: 100 100
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.8(Ty)0 12 S
(pe "N" records are no longer generated by GNU tar).8 E(.)-.55 E(The)0
24 Q 2.5(yc)-.15 G(ontained a)-2.5 E
(list of \214les to be renamed or symlink)0 36 Q(ed after e)-.1 E
(xtraction; this w)-.15 E(as)-.1 E
(originally used to support long names.)0 48 Q
(The contents of this record)0 60 Q(are a te)0 72 Q
(xt description of the operations to be done, in the form)-.15 E 0 Cg EP
%%Page: 101 101
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(Rename %s to %s\\n').74 E(')-.74
E(or)0 24 Q -.74(``)0 36 S(Symlink %s to %s\\n').74 E(';)-.74 E
(in either case, both)0 48 Q
(\214lenames are escaped using K&R C syntax.)0 60 Q
(Due to security concerns, "N" records are no)0 72 Q 2.5(wg)-.25 G
(enerally ignored)-2.5 E 0 Cg EP
%%Page: 102 102
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(when reading archi)0 12 Q -.15(ve)-.25 G(s.).15
E(<p><dt>S<dd>)0 24 Q(This is a)0 36 Q -.74(``)0 48 S(sparse').74 E(')
-.74 E(re)0 60 Q(gular \214le.)-.15 E
(Sparse \214les are stored as a series of fragments.)0 72 Q 0 Cg EP
%%Page: 103 103
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The header contains a list of fragment of)0 12 Q
(fset/length pairs.)-.25 E
(If more than four such entries are required, the header is)0 24 Q -.15
(ex)0 36 S(tended as necessary with).15 E -.74(``)0 48 S -.15(ex).74 G
(tra').15 E(')-.74 E(header e)0 60 Q
(xtensions \(an older format that is no longer used\), or)-.15 E -.74
(``)0 72 S(sparse').74 E(')-.74 E 0 Cg EP
%%Page: 104 104
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.15(ex)0 12 S(tensions.).15 E(<p><dt>V<dd>)0 24
Q(The)0 36 Q(<i></i><i>name</i>)0 48 Q
(\214eld should be interpreted as a tape/v)0 60 Q(olume header name.)-.2
E(This entry should generally be ignored on e)0 72 Q(xtraction.)-.15 E 0
Cg EP
%%Page: 105 105
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</dl>)0 12 Q(<p><dt><i></i><i>magic</i><dd>)0 24
Q(The magic \214eld holds the \214v)0 36 Q 2.5(ec)-.15 G(haracters)-2.5
E -.74(``)0 48 S(ustar').74 E(')-.74 E(follo)0 60 Q(wed by a space.)-.25
E(Note that POSIX ustar archi)0 72 Q -.15(ve)-.25 G 2.5(sh).15 G -2.25
-.2(av e)-2.5 H 2.5(at)2.7 G(railing null.)-2.5 E 0 Cg EP
%%Page: 106 106
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p><dt><i></i><i>v)0 12 Q(ersion</i><dd>)-.15 E
(The v)0 24 Q(ersion \214eld holds a space character follo)-.15 E
(wed by a null.)-.25 E(Note that POSIX ustar archi)0 36 Q -.15(ve)-.25 G
2.5(su).15 G(se tw)-2.5 E 2.5(oc)-.1 G(opies of the ASCII digit)-2.5 E
-.74(``)0 48 S(0').74 E('.)-.74 E
(<p><dt><i></i><i>atime</i><i></i>,<i> ctime</i><dd>)0 60 Q
(The time the \214le w)0 72 Q(as last accessed and the time of)-.1 E 0
Cg EP
%%Page: 107 107
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(last change of \214le information, stored in octal as with)0 12 Q
(<i></i><i>mtime</i>.)0 24 Q(<p><dt><i></i><i>longnames</i><dd>)0 36 Q
(This \214eld is apparently no longer used.)0 48 Q
(<p><dt>Sparse<i></i><i> of)0 60 Q
(fset</i><i> /</i><i></i><i> numbytes</i><dd>)-.25 E
(Each such structure speci\214es a single fragment of a sparse)0 72 Q 0
Cg EP
%%Page: 108 108
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\214le.)0 12 Q(The tw)0 24 Q 2.5<6f8c>-.1 G
(elds store v)-2.5 E(alues as octal numbers.)-.25 E
(The fragments are each padded to a multiple of 512 bytes)0 36 Q
(in the archi)0 48 Q -.15(ve)-.25 G(.).15 E(On e)0 60 Q
(xtraction, the list of fragments is collected from the)-.15 E
(header \(including an)0 72 Q 2.5(ye)-.15 G
(xtension headers\), and the data)-2.65 E 0 Cg EP
%%Page: 109 109
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(is then read and written to the \214le at appropriate of)0 12 Q(fsets.)
-.25 E(<p><dt><i></i><i>ise)0 24 Q(xtended</i><dd>)-.15 E
(If this is set to non-zero, the header will be follo)0 36 Q
(wed by additional)-.25 E -.74(``)0 48 S(sparse header').74 E(')-.74 E
(records.)0 60 Q(Each such record contains information about as man)0 72
Q 2.5(ya)-.15 G 2.5(s2)-2.5 G 2.5(1a)-2.5 G(dditional)-2.5 E 0 Cg EP
%%Page: 110 110
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(sparse blocks as sho)0 12 Q(wn here:)-.25 E
(<dl compact><dt><dd>)0 24 Q(<code>)0 36 Q(<pre>)0 48 Q
(struct gnu_sparse_header {)0 60 Q(struct {)36 72 Q 0 Cg EP
%%Page: 111 111
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(char of)72 12 Q(fset[12];)-.25 E
(char numbytes[12];)72 24 Q 2.5(}s)36 36 S(parse[21];)-2.5 E 7.5
(char ise)36 48 R(xtended[1];)-.15 E 7.5(char padding[7];)36 60 R(};)0
72 Q 0 Cg EP
%%Page: 112 112
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</pre>)0 12 Q(</code>)0 24 Q(</dl>)0 36 Q
(<p><dt><i></i><i>realsize</i><dd>)0 48 Q 2.5(Ab)0 60 S
(inary representation of the \214le')-2.5 E 2.5(sc)-.55 G
(omplete size, with a much lar)-2.5 E(ger range)-.18 E
(than the POSIX \214le size.)0 72 Q 0 Cg EP
%%Page: 113 113
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(In particular)0 12 Q 2.5(,w)-.4 G(ith)-2.5 E
(<b></b><b>M</b>)0 24 Q
(type \214les, the current entry is only a portion of the \214le.)0 36 Q
(In that case, the POSIX size \214eld will indicate the size of this)0
48 Q(entry; the)0 60 Q(<i></i><i>realsize</i>)0 72 Q 0 Cg EP
%%Page: 114 114
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(\214eld will indicate the total size of the \214le.)0 12 Q(</dl>)0 24 Q
(<h4 id="GNU tar pax archi)36 36 Q -.15(ve)-.25 G(s">).15 E
(GNU tar pax archi)36 48 Q -.15(ve)-.25 G(s).15 E(</h4>)36 60 Q
(GNU tar 1.14 \(XXX check this XXX\) and later will write)0 72 Q 0 Cg EP
%%Page: 115 115
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(pax interchange format archi)0 12 Q -.15(ve)-.25
G 2.5(sw).15 G(hen you specify the)-2.5 E(<b>\255</b><b>-posix</b>)0 24
Q(\215ag.)0 36 Q(This format uses custom k)0 48 Q -.15(ey)-.1 G -.1(wo)
.15 G(rds to store sparse \214le information.).1 E(There ha)0 60 Q .3
-.15(ve b)-.2 H(een three iterations of this support, referred to).15 E
(as)0 72 Q 0 Cg EP
%%Page: 116 116
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.74(``)0 12 S(0.0').74 E(',)-.74 E -.74(``)0 24
S(0.1').74 E(',)-.74 E(and)0 36 Q -.74(``)0 48 S(1.0').74 E('.)-.74 E
(<dl compact>)0 60 Q
(<p><dt><b></b><b>GNU.sparse.numblocks</b><b></b>,<b> GNU.sparse.of)0 72
Q(fset</b><b></b>,<b> GNU.sparse.numbytes</b><b></b>,<b> GNU.sparse.siz\
e</b><dd>)-.25 E 0 Cg EP
%%Page: 117 117
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q -.74(``)0 24 S(0.0').74 E(')-.74 E
(format used an initial)0 36 Q(<b></b><b>GNU.sparse.numblocks</b>)0 48 Q
(attrib)0 60 Q
(ute to indicate the number of blocks in the \214le, a pair of)-.2 E
(<b></b><b>GNU.sparse.of)0 72 Q(fset</b>)-.25 E 0 Cg EP
%%Page: 118 118
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and)0 12 Q(<b></b><b>GNU.sparse.numbytes</b>)0
24 Q(to indicate the of)0 36 Q(fset and size of each block,)-.25 E
(and a single)0 48 Q(<b></b><b>GNU.sparse.size</b>)0 60 Q
(to indicate the full size of the \214le.)0 72 Q 0 Cg EP
%%Page: 119 119
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(This is not the same as the size in the tar header because the)0 12 Q
(latter v)0 24 Q(alue does not include the size of an)-.25 E 2.5(yh)-.15
G(oles.)-2.5 E(This format required that the order of attrib)0 36 Q
(utes be preserv)-.2 E(ed and)-.15 E
(relied on readers accepting multiple appearances of the same attrib)0
48 Q(ute)-.2 E(names, which is not of)0 60 Q
(\214cially permitted by the standards.)-.25 E
(<p><dt><b></b><b>GNU.sparse.map</b><dd>)0 72 Q 0 Cg EP
%%Page: 120 120
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The)0 12 Q -.74(``)0 24 S(0.1').74 E(')-.74 E
(format used a single attrib)0 36 Q(ute that stored a comma-separated)
-.2 E(list of decimal numbers.)0 48 Q
(Each pair of numbers indicated the of)0 60 Q(fset and size, respecti)
-.25 E -.15(ve)-.25 G(ly).15 E(,)-.65 E(of a block of data.)0 72 Q 0 Cg
EP
%%Page: 121 121
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This does not w)0 12 Q(ork well if the archi)-.1
E .3 -.15(ve i)-.25 H 2.5(se).15 G(xtracted by an archi)-2.65 E -.15(ve)
-.25 G(r).15 E(that does not recognize this e)0 24 Q
(xtension, since man)-.15 E 2.5(yp)-.15 G(ax implementations)-2.5 E
(simply discard unrecognized attrib)0 36 Q(utes.)-.2 E(<p><dt><b></b><b\
>GNU.sparse.major</b><b></b>,<b> GNU.sparse.minor</b><b></b>,<b> GNU.sp\
arse.name</b><b></b>,<b> GNU.sparse.realsize</b><dd>)0 48 Q(The)0 60 Q
-.74(``)0 72 S(1.0').74 E(')-.74 E 0 Cg EP
%%Page: 122 122
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(format stores the sparse block map in one or more 512-byte blocks)0 12
Q(prepended to the \214le data in the entry body)0 24 Q(.)-.65 E
(The pax attrib)0 36 Q(utes indicate the e)-.2 E(xistence of this map)
-.15 E(\(via the)0 48 Q(<b></b><b>GNU.sparse.major</b>)0 60 Q(and)0 72 Q
0 Cg EP
%%Page: 123 123
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>GNU.sparse.minor</b>)0 12 Q
(\214elds\))0 24 Q(and the full size of the \214le.)0 36 Q(The)0 48 Q
(<b></b><b>GNU.sparse.name</b>)0 60 Q
(holds the true name of the \214le.)0 72 Q 0 Cg EP
%%Page: 124 124
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF 1.6 -.8(To a)0 12 T -.2(vo).6 G
(id confusion, the name stored in the re).2 E(gular tar header)-.15 E
(is a modi\214ed name so that e)0 24 Q
(xtraction errors will be apparent)-.15 E(to users.)0 36 Q(</dl>)0 48 Q
(<h4 id="Solaris T)36 60 Q(ar">)-.8 E(Solaris T)36 72 Q(ar)-.8 E 0 Cg EP
%%Page: 125 125
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(</h4>)36 12 Q(XXX More Details Needed XXX)0 24 Q
(<p>)36 36 Q(Solaris tar \(be)0 48 Q
(ginning with SunOS XXX 5.7 ?? XXX\) supports an)-.15 E -.74(``)0 60 S
-.15(ex).74 G(tended').15 E(')-.74 E
(format that is fundamentally similar to pax interchange format,)0 72 Q
0 Cg EP
%%Page: 126 126
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(with the follo)0 12 Q(wing dif)-.25 E(ferences:)
-.25 E(<ul>)0 24 Q(<li>)0 36 Q(Extended attrib)0 48 Q
(utes are stored in an entry whose type is)-.2 E(<b></b><b>X</b>,)0 60 Q
(not)0 72 Q 0 Cg EP
%%Page: 127 127
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b></b><b>x</b>,)0 12 Q
(as used by pax interchange format.)0 24 Q
(The detailed format of this entry appears to be the same)0 36 Q
(as detailed abo)0 48 Q .3 -.15(ve f)-.15 H(or the).15 E
(<b></b><b>x</b>)0 60 Q(entry)0 72 Q(.)-.65 E 0 Cg EP
%%Page: 128 128
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<li>)0 12 Q(An additional)0 24 Q
(<b></b><b>A</b>)0 36 Q(entry is used to store an A)0 48 Q
(CL for the follo)-.4 E(wing re)-.25 E(gular entry)-.15 E(.)-.65 E
(The body of this entry contains a se)0 60 Q -.15(ve)-.25 G
(n-digit octal number).15 E(follo)0 72 Q(wed by a zero byte, follo)-.25
E(wed by the)-.25 E 0 Cg EP
%%Page: 129 129
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(te)0 12 Q(xtual A)-.15 E(CL description.)-.4 E
(The octal v)0 24 Q(alue is the number of A)-.25 E(CL entries)-.4 E
(plus a constant that indicates the A)0 36 Q(CL type: 01000000)-.4 E
(for POSIX.1e A)0 48 Q(CLs and 03000000 for NFSv4 A)-.4 E(CLs.)-.4 E
(</ul>)0 60 Q(<h4 id="AIX T)36 72 Q(ar">)-.8 E 0 Cg EP
%%Page: 130 130
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(AIX T)36 12 Q(ar)-.8 E(</h4>)36 24 Q
(XXX More details needed XXX)0 36 Q(<h4 id="Mac OS X T)36 48 Q(ar">)-.8
E(Mac OS X T)36 60 Q(ar)-.8 E(</h4>)36 72 Q 0 Cg EP
%%Page: 131 131
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The tar distrib)0 12 Q(uted with Apple')-.2 E
2.5(sM)-.55 G(ac OS X stores most re)-2.5 E(gular \214les)-.15 E(as tw)0
24 Q 2.5(os)-.1 G(eparate entries in the tar archi)-2.5 E -.15(ve)-.25 G
(.).15 E(The tw)0 36 Q 2.5(oe)-.1 G(ntries ha)-2.5 E .3 -.15(ve t)-.2 H
(he same name e).15 E(xcept that the \214rst)-.15 E(one has)0 48 Q -.74
(``)0 60 S(._').74 E(')-.74 E(added to the be)0 72 Q
(ginning of the name.)-.15 E 0 Cg EP
%%Page: 132 132
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(This \214rst entry stores the)0 12 Q -.74(``)0
24 S(resource fork').74 E(')-.74 E(with additional attrib)0 36 Q
(utes for the \214le.)-.2 E(The Mac OS X)0 48 Q(<b>Cop)0 60 Q
(yFile</b>\(<code></code>\))-.1 E
(API is used to separate a \214le on disk into separate)0 72 Q 0 Cg EP
%%Page: 133 133
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF
(resource and data streams and to reassemble those separate)0 12 Q
(streams when the \214le is restored to disk.)0 24 Q
(<h4 id="Other Extensions">)36 36 Q(Other Extensions)36 48 Q(</h4>)36 60
Q(One ob)0 72 Q(vious e)-.15 E
(xtension to increase the size of \214les is to)-.15 E 0 Cg EP
%%Page: 134 134
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(eliminate the terminating characters from the v)
0 12 Q(arious)-.25 E(numeric \214elds.)0 24 Q -.15(Fo)0 36 S 2.5(re).15
G(xample, the standard only allo)-2.65 E(ws the size \214eld to contain)
-.25 E(11 octal digits, reserving the twelfth byte for a trailing)0 48 Q
(NUL character)0 60 Q(.)-.55 E(Allo)0 72 Q(wing 12 octal digits allo)
-.25 E(ws \214le sizes up to 64 GB.)-.25 E 0 Cg EP
%%Page: 135 135
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(Another e)0 24 Q
(xtension, utilized by GNU tar)-.15 E 2.5(,s)-.4 G(tar)-2.5 E 2.5(,a)-.4
G(nd other ne)-2.5 E(wer)-.25 E(<b>tar</b>)0 36 Q(implementations, perm\
its binary numbers in the standard numeric \214elds.)0 48 Q
(This is \215agged by setting the high bit of the \214rst byte.)0 60 Q
(This permits 95-bit v)0 72 Q(alues for the length and time \214elds)
-.25 E 0 Cg EP
%%Page: 136 136
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(and 63-bit v)0 12 Q
(alues for the uid, gid, and de)-.25 E(vice numbers.)-.25 E
(GNU tar supports this e)0 24 Q(xtension for the)-.15 E
(length, mtime, ctime, and atime \214elds.)0 36 Q(Joer)0 48 Q 2.5(gS)
-.18 G(chilling')-2.5 E 2.5(ss)-.55 G(tar program supports this e)-2.5 E
(xtension for)-.15 E(all numeric \214elds.)0 60 Q(Note that this e)0 72
Q(xtension is lar)-.15 E(gely obsoleted by the e)-.18 E(xtended attrib)
-.15 E(ute)-.2 E 0 Cg EP
%%Page: 137 137
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(record pro)0 12 Q
(vided by the pax interchange format.)-.15 E(<p>)36 24 Q
(Another early GNU e)0 36 Q(xtension allo)-.15 E(wed base-64 v)-.25 E
(alues rather than octal.)-.25 E(This e)0 48 Q(xtension w)-.15 E
(as short-li)-.1 E -.15(ve)-.25 G 2.5(da).15 G
(nd is no longer supported by an)-2.5 E(y)-.15 E(implementation.)0 60 Q
(<h3 id="SEE ALSO">)36 72 Q 0 Cg EP
%%Page: 138 138
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(SEE ALSO)36 12 Q(</h3>)36 24 Q
(<a href="../html1/ar)0 36 Q(.html">ar\(1\)</a>,)-.55 E
(<a href="../html1/pax.html">pax\(1\)</a>,)0 48 Q(<a href="../html1/tar)
0 60 Q(.html">tar\(1\)</a>)-.55 E(<h3 id="ST)36 72 Q(AND)-.93 E(ARDS">)
-.4 E 0 Cg EP
%%Page: 139 139
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(ST)36 12 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 24 Q
(The)0 36 Q(<b>tar</b>)0 48 Q
(utility is no longer a part of POSIX or the Single Unix Standard.)0 60
Q(It last appeared in)0 72 Q 0 Cg EP
%%Page: 140 140
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -1.11(Ve)2.5 12 S
(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E
('\) .)-.74 E(It has been supplanted in subsequent standards by)0 24 Q
(<a href="../html1/pax.html">pax\(1\)</a>.)0 36 Q
(The ustar format is currently part of the speci\214cation for the)0 48
Q(<a href="../html1/pax.html">pax\(1\)</a>)0 60 Q(utility)0 72 Q(.)-.65
E 0 Cg EP
%%Page: 141 141
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(The pax interchange \214le format is ne)0 12 Q
2.5(ww)-.25 G(ith)-2.5 E(IEEE Std 1003.1-2001 \(`)2.5 24 Q
(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(<h3 id="HIST)36 36
Q(OR)-.18 E(Y">)-.65 E(HIST)36 48 Q(OR)-.18 E(Y)-.65 E(</h3>)36 60 Q(A)0
72 Q 0 Cg EP
%%Page: 142 142
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<b>tar</b>)0 12 Q(command appeared in Se)0 24 Q
-.15(ve)-.25 G(nth Edition Unix, which w).15 E(as released in January)
-.1 E 2.5(,1)-.65 G(979.)-2.5 E(It replaced the)0 36 Q(<b>tp</b>)0 48 Q
(program from F)0 60 Q(ourth Edition Unix which in turn replaced the)
-.15 E(<b>tap</b>)0 72 Q 0 Cg EP
%%Page: 143 143
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(program from First Edition Unix.)0 12 Q
(John Gilmore')0 24 Q(s)-.55 E(<b>pdtar</b>)0 36 Q
(public-domain implementation \(circa 1987\) w)0 48 Q
(as highly in\215uential)-.1 E(and formed the basis of)0 60 Q
(<b>GNU</b><b>tar</b>)0 72 Q 0 Cg EP
%%Page: 144 144
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(\(circa 1988\).)0 12 Q(Joer)0 24 Q 2.5(gS)-.18 G
(hilling')-2.5 E(s)-.55 E(<b>star</b>)0 36 Q(archi)0 48 Q -.15(ve)-.25 G
2.5(ri).15 G 2.5(sa)-2.5 G(nother open-source \(GPL\) archi)-2.5 E -.15
(ve)-.25 G 2.5(r\().15 G(originally de)-2.5 E -.15(ve)-.25 G(loped).15 E
(circa 1985\) which features complete support for pax interchange)0 60 Q
(format.)0 72 Q 0 Cg EP
%%Page: 145 145
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF(<p>)36 12 Q(This documentation w)0 24 Q
(as written as part of the)-.1 E(<b>libarchi)0 36 Q -.15(ve)-.25 G(</b>)
.15 E(and)0 48 Q(<b>bsdtar</b>)0 60 Q(project by)0 72 Q 0 Cg EP
%%Page: 146 146
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@@0 SF -.35(Ti)0 12 S 2.5(mK).35 G
(ientzle &lt;kientzle@@FreeBSD.or)-2.5 E(g&gt;<br>.)-.18 E(</body>)0 24 Q
(</html>)0 36 Q 0 Cg EP
%%Trailer
end
%%EOF
@


1.1.1.5
log
@Import libarchive-3.2.1:
- security fixes and other bugfixes
- support for multhreading in xz 5.2+
@
text
@d1 1657
a1657 1558
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title></title>
</head>
<body>

<hr>


<p>TAR(5) BSD File Formats Manual TAR(5)</p>

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>tar</b> &mdash; format of
tape archive files</p>

<p style="margin-top: 1em"><b>DESCRIPTION</b></p>

<p style="margin-left:6%;">The <b>tar</b> archive format
collects any number of files, directories, and other file
system objects (symbolic links, device nodes, etc.) into a
single stream of bytes. The format was originally designed
to be used with tape drives that operate with fixed-size
blocks, but is widely used as a general packaging
mechanism.</p>

<p style="margin-left:6%; margin-top: 1em"><b>General
Format</b> <br>
A <b>tar</b> archive consists of a series of 512-byte
records. Each file system object requires a header record
which stores basic metadata (pathname, owner, permissions,
etc.) and zero or more records containing any file data. The
end of the archive is indicated by two records consisting
entirely of zero bytes.</p>

<p style="margin-left:6%; margin-top: 1em">For
compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a
fixed number of records with each I/O operation. These
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
implementations was 10240 bytes or 20 records. This is still
the default for most implementations although block sizes of
1MiB (2048 records) or larger are commonly used with modern
high-speed tape drives. (Note: the terms
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>

<p style="margin-left:6%; margin-top: 1em"><b>Old-Style
Archive Format</b> <br>
The original tar archive format has been extended many times
to include additional information that various implementors
found necessary. This section describes the variant
implemented by the tar command included in Version&nbsp;7
AT&amp;T UNIX, which seems to be the earliest widely-used
version of the tar program.</p>

<p style="margin-left:6%; margin-top: 1em">The header
record for an old-style <b>tar</b> archive consists of the
following:</p>

<p style="margin-left:14%; margin-top: 1em">struct
header_old_tar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char name[100];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mode[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char uid[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char gid[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char size[12];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mtime[12];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char checksum[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char linkflag[1];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char linkname[100];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char pad[255];</p></td>
<td width="65%">
</td></tr>
</table>

<p style="margin-left:14%;">};</p>

<p style="margin-left:6%;">All unused bytes in the header
record are filled with nulls.</p>

<p style="margin-top: 1em"><i>name</i></p>

<p style="margin-left:17%; margin-top: 1em">Pathname,
stored as a null-terminated string. Early tar
implementations only stored regular files (including
hardlinks to those files). One common early convention used
a trailing &quot;/&quot; character to indicate a directory
name, allowing directory permissions and owner information
to be archived and restored.</p>

<p style="margin-top: 1em"><i>mode</i></p>

<p style="margin-left:17%; margin-top: 1em">File mode,
stored as an octal number in ASCII.</p>

<p style="margin-top: 1em"><i>uid</i>, <i>gid</i></p>

<p style="margin-left:17%;">User id and group id of owner,
as octal numbers in ASCII.</p>

<p style="margin-top: 1em"><i>size</i></p>

<p style="margin-left:17%; margin-top: 1em">Size of file,
as octal number in ASCII. For regular files only, this
indicates the amount of data that follows the header. In
particular, this field was ignored by early tar
implementations when extracting hardlinks. Modern writers
should always store a zero length for hardlink entries.</p>

<p style="margin-top: 1em"><i>mtime</i></p>

<p style="margin-left:17%; margin-top: 1em">Modification
time of file, as an octal number in ASCII. This indicates
the number of seconds since the start of the epoch, 00:00:00
UTC January 1, 1970. Note that negative values should be
avoided here, as they are handled inconsistently.</p>

<p style="margin-top: 1em"><i>checksum</i></p>

<p style="margin-left:17%;">Header checksum, stored as an
octal number in ASCII. To compute the checksum, set the
checksum field to all spaces, then sum all bytes in the
header using unsigned arithmetic. This field should be
stored as six octal digits followed by a null and a space
character. Note that many early implementations of tar used
signed arithmetic for the checksum field, which can cause
interoperability problems when transferring archives between
systems. Modern robust readers compute the checksum both
ways and accept the header if either computation
matches.</p>

<p style="margin-top: 1em"><i>linkflag</i>,
<i>linkname</i></p>

<p style="margin-left:17%;">In order to preserve hardlinks
and conserve tape, a file with multiple links is only
written to the archive the first time it is encountered. The
next time it is encountered, the <i>linkflag</i> is set to
an ASCII &rsquo;1&rsquo; and the <i>linkname</i> field holds
the first name under which this file appears. (Note that
regular files have a null value in the <i>linkflag</i>
field.)</p>

<p style="margin-left:6%; margin-top: 1em">Early tar
implementations varied in how they terminated these fields.
The tar command in Version&nbsp;7 AT&amp;T UNIX used the
following conventions (this is also documented in early BSD
manpages): the pathname must be null-terminated; the mode,
uid, and gid fields must end in a space and a null byte; the
size and mtime fields must end in a space; the checksum is
terminated by a null and a space. Early implementations
filled the numeric fields with leading spaces. This seems to
have been common practice until the IEEE Std 1003.1-1988
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Pre-POSIX
Archives</b> <br>
An early draft of IEEE Std 1003.1-1988
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
described below with the following variations:</p>

<p><b>&bull;</b></p>

<p style="margin-left:17%;">The magic value consists of the
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
by a space. The version field contains a space character
followed by a null.</p>

<p><b>&bull;</b></p>

<p style="margin-left:17%;">The numeric fields are
generally filled with leading spaces (not leading zeros as
recommended in the final standard).</p>

<p><b>&bull;</b></p>

<p style="margin-left:17%;">The prefix field is often not
used, limiting pathnames to the 100 characters of old-style
archives.</p>

<p style="margin-left:6%; margin-top: 1em"><b>POSIX ustar
Archives</b> <br>
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>

<p style="margin-left:14%; margin-top: 1em">struct
header_posix_ustar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char name[100];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mode[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char uid[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char gid[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char size[12];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mtime[12];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char checksum[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char typeflag[1];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char linkname[100];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char magic[6];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char version[2];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char uname[32];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char gname[32];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char devmajor[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char devminor[8];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char prefix[155];</p></td>
<td width="65%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char pad[12];</p></td>
<td width="65%">
</td></tr>
</table>

<p style="margin-left:14%;">};</p>

<p style="margin-top: 1em"><i>typeflag</i></p>

<p style="margin-left:17%;">Type of entry. POSIX extended
the earlier <i>linkflag</i> field with several new type
values:</p>

<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Regular file.
NUL should be treated as a synonym, for compatibility
purposes.</p>

<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Hard link.</p>

<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Symbolic
link.</p>

<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Character
device node.</p>

<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Block device
node.</p>

<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Directory.</p>

<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">FIFO node.</p>

<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>

<p style="margin-left:27%; margin-top: 1em">Reserved.</p>

<p>Other</p>

<p style="margin-left:27%; margin-top: 1em">A
POSIX-compliant implementation must treat any unrecognized
typeflag value as a regular file. In particular, writers
should ensure that all entries have a valid filename so that
they can be restored by readers that do not support the
corresponding extension. Uppercase letters &quot;A&quot;
through &quot;Z&quot; are reserved for custom extensions.
Note that sockets and whiteout entries are not
archivable.</p>

<p style="margin-left:17%;">It is worth noting that the
<i>size</i> field, in particular, has different meanings
depending on the type. For regular files, of course, it
indicates the amount of data following the header. For
directories, it may be used to indicate the total size of
all files in the directory, for use by operating systems
that pre-allocate directory space. For all other types, it
should be set to zero by writers and ignored by readers.</p>

<p style="margin-top: 1em"><i>magic</i></p>

<p style="margin-left:17%; margin-top: 1em">Contains the
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>

<p style="margin-top: 1em"><i>version</i></p>

<p style="margin-left:17%;">Version. This should be
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>

<p style="margin-top: 1em"><i>uname</i>, <i>gname</i></p>

<p style="margin-left:17%;">User and group names, as
null-terminated ASCII strings. These should be used in
preference to the uid/gid values when they are set and the
corresponding names exist on the system.</p>

<p style="margin-top: 1em"><i>devmajor</i>,
<i>devminor</i></p>

<p style="margin-left:17%;">Major and minor numbers for
character device or block device entry.</p>

<p style="margin-top: 1em"><i>name</i>, <i>prefix</i></p>

<p style="margin-left:17%;">If the pathname is too long to
fit in the 100 bytes provided by the standard format, it can
be split at any <i>/</i> character with the first portion
going into the prefix field. If the prefix field is not
empty, the reader will prepend the prefix value and a
<i>/</i> character to the regular name field to obtain the
full pathname. The standard does not require a trailing
<i>/</i> character on directory names, though most
implementations still include this for compatibility
reasons.</p>

<p style="margin-left:6%; margin-top: 1em">Note that all
unused bytes must be set to NUL.</p>

<p style="margin-left:6%; margin-top: 1em">Field
termination is specified slightly differently by POSIX than
by previous implementations. The <i>magic</i>, <i>uname</i>,
and <i>gname</i> fields must have a trailing NUL. The
<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields
must have a trailing NUL unless they fill the entire field.
(In particular, it is possible to store a 256-character
pathname if it happens to have a <i>/</i> as the 156th
character.) POSIX requires numeric fields to be zero-padded
in the front, and requires them to be terminated with either
space or NUL characters.</p>

<p style="margin-left:6%; margin-top: 1em">Currently, most
tar implementations comply with the ustar format,
occasionally extending it by adding new fields to the blank
area at the end of the header record.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Numeric
Extensions</b> <br>
There have been several attempts to extend the range of
sizes or times supported by modifying how numbers are stored
in the header.</p>

<p style="margin-left:6%; margin-top: 1em">One obvious
extension to increase the size of files is to eliminate the
terminating characters from the various numeric fields. For
example, the standard only allows the size field to contain
11 octal digits, reserving the twelfth byte for a trailing
NUL character. Allowing 12 octal digits allows file sizes up
to 64 GB.</p>

<p style="margin-left:6%; margin-top: 1em">Another
extension, utilized by GNU tar, star, and other newer
<b>tar</b> implementations, permits binary numbers in the
standard numeric fields. This is flagged by setting the high
bit of the first byte. The remainder of the field is treated
as a signed twos-complement value. This permits 95-bit
values for the length and time fields and 63-bit values for
the uid, gid, and device numbers. In particular, this
provides a consistent way to handle negative time values.
GNU tar supports this extension for the length, mtime,
ctime, and atime fields. Joerg Schilling&rsquo;s star
program and the libarchive library support this extension
for all numeric fields. Note that this extension is largely
obsoleted by the extended attribute record provided by the
pax interchange format.</p>

<p style="margin-left:6%; margin-top: 1em">Another early
GNU extension allowed base-64 values rather than octal. This
extension was short-lived and is no longer supported by any
implementation.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Pax
Interchange Format</b> <br>
There are many attributes that cannot be portably stored in
a POSIX ustar archive. IEEE Std 1003.1-2001
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>

<p style="margin-left:6%; margin-top: 1em">An entry in a
pax interchange format archive consists of one or two
standard ustar entries, each with its own header and data.
The first optional entry stores the extended attributes for
the following entry. This optional first entry has an
&quot;x&quot; typeflag and a size field that indicates the
total size of the extended attributes. The extended
attributes themselves are stored as a series of text-format
lines encoded in the portable UTF-8 encoding. Each line
consists of a decimal number, a space, a key string, an
equals sign, a value string, and a new line. The decimal
number indicates the length of the entire line, including
the initial length field and the trailing newline. An
example of such a field is:</p>

<p style="margin-left:14%;">25 ctime=1084839148.1212\n</p>

<p style="margin-left:6%;">Keys in all lowercase are
standard keys. Vendors can add their own keys by prefixing
them with an all uppercase vendor name and a period. Note
that, unlike the historic header, numeric values are stored
using decimal, not octal. A description of some common keys
follows:</p>

<p style="margin-top: 1em"><b>atime</b>, <b>ctime</b>,
<b>mtime</b></p>

<p style="margin-left:17%;">File access, inode change, and
modification times. These fields can be negative or include
a decimal point and a fractional value.</p>

<p style="margin-top: 1em"><b>hdrcharset</b></p>

<p style="margin-left:17%;">The character set used by the
pax extension values. By default, all textual values in the
pax extended attributes are assumed to be in UTF-8,
including pathnames, user names, and group names. In some
cases, it is not possible to translate local conventions
into UTF-8. If this key is present and the value is the
six-character ASCII string
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
are assumed to be in a platform-dependent multi-byte
encoding. Note that there are only two valid values for this
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
No other values are permitted by the standard, and the
latter value should generally not be used as it is the
default when this key is not specified. In particular, this
flag should not be used as a general mechanism to allow
filenames to be stored in arbitrary encodings.</p>

<p style="margin-top: 1em"><b>uname</b>, <b>uid</b>,
<b>gname</b>, <b>gid</b></p>

<p style="margin-left:17%;">User name, group name, and
numeric UID and GID values. The user name and group name
stored here are encoded in UTF8 and can thus include
non-ASCII characters. The UID and GID fields can be of
arbitrary length.</p>

<p style="margin-top: 1em"><b>linkpath</b></p>

<p style="margin-left:17%;">The full path of the linked-to
file. Note that this is encoded in UTF8 and can thus include
non-ASCII characters.</p>

<p style="margin-top: 1em"><b>path</b></p>

<p style="margin-left:17%; margin-top: 1em">The full
pathname of the entry. Note that this is encoded in UTF8 and
can thus include non-ASCII characters.</p>

<p style="margin-top: 1em"><b>realtime.*</b>,
<b>security.*</b></p>

<p style="margin-left:17%;">These keys are reserved and may
be used for future standardization.</p>

<p style="margin-top: 1em"><b>size</b></p>

<p style="margin-left:17%; margin-top: 1em">The size of the
file. Note that there is no length limit on this field,
allowing conforming archives to store files much larger than
the historic 8GB limit.</p>

<p style="margin-top: 1em"><b>SCHILY.*</b></p>

<p style="margin-left:17%;">Vendor-specific attributes used
by Joerg Schilling&rsquo;s <b>star</b> implementation.</p>

<p style="margin-top: 1em"><b>SCHILY.acl.access</b>,
<b>SCHILY.acl.default</b></p>

<p style="margin-left:17%;">Stores the access and default
ACLs as textual strings in a format that is an extension of
the format specified by POSIX.1e draft 17. In particular,
each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID. This
allows ACLs to be restored on systems that may not have
complete user or group information available (such as when
NIS/YP or LDAP services are temporarily unavailable).</p>

<p style="margin-top: 1em"><b>SCHILY.devminor</b>,
<b>SCHILY.devmajor</b></p>

<p style="margin-left:17%;">The full minor and major
numbers for device nodes.</p>

<p style="margin-top: 1em"><b>SCHILY.fflags</b></p>

<p style="margin-left:17%;">The file flags.</p>

<p style="margin-top: 1em"><b>SCHILY.realsize</b></p>

<p style="margin-left:17%;">The full size of the file on
disk. XXX explain? XXX</p>

<p style="margin-top: 1em"><b>SCHILY.dev, SCHILY.ino</b>,
<b>SCHILY.nlinks</b></p>

<p style="margin-left:17%;">The device number, inode
number, and link count for the entry. In particular, note
that a pax interchange format archive using Joerg
Schilling&rsquo;s <b>SCHILY.*</b> extensions can store all
of the data from <i>struct stat</i>.</p>

<p style="margin-top: 1em"><b>LIBARCHIVE.*</b></p>

<p style="margin-left:17%;">Vendor-specific attributes used
by the <b>libarchive</b> library and programs that use
it.</p>


<p style="margin-top: 1em"><b>LIBARCHIVE.creationtime</b></p>

<p style="margin-left:17%;">The time when the file was
created. (This should not be confused with the POSIX
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
the time when the file metadata was last changed.)</p>


<p style="margin-top: 1em"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p>

<p style="margin-left:17%;">Libarchive stores
POSIX.1e-style extended attributes using keys of this form.
The <i>key</i> value is URL-encoded: All non-ASCII
characters and the two special characters
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>

<p style="margin-top: 1em"><b>VENDOR.*</b></p>

<p style="margin-left:17%;">XXX document other
vendor-specific extensions XXX</p>

<p style="margin-left:6%; margin-top: 1em">Any values
stored in an extended attribute override the corresponding
values in the regular tar header. Note that compliant
readers should ignore the regular fields when they are
overridden. This is important, as existing archivers are
known to store non-compliant values in the standard header
fields in this situation. There are no limits on length for
any of these fields. In particular, numeric fields can be
arbitrarily large. All text fields are encoded in UTF8.
Compliant writers should store only portable 7-bit ASCII
characters in the standard ustar header and use extended
attributes whenever a text value contains non-ASCII
characters.</p>

<p style="margin-left:6%; margin-top: 1em">In addition to
the <b>x</b> entry described above, the pax interchange
format also supports a <b>g</b> entry. The <b>g</b> entry is
identical in format, but specifies attributes that serve as
defaults for all subsequent archive entries. The <b>g</b>
entry is not widely used.</p>

<p style="margin-left:6%; margin-top: 1em">Besides the new
<b>x</b> and <b>g</b> entries, the pax interchange format
has a few other minor variations from the earlier ustar
format. The most troubling one is that hardlinks are
permitted to have data following them. This allows readers
to restore any hardlink to a file without having to rewind
the archive to find an earlier entry. However, it creates
complications for robust readers, as it is no longer clear
whether or not they should ignore the size field for
hardlink entries.</p>

<p style="margin-left:6%; margin-top: 1em"><b>GNU Tar
Archives</b> <br>
The GNU tar program started with a pre-POSIX format similar
to that described earlier and has extended it using several
different mechanisms: It added new fields to the empty space
in the header (some of which was later used by POSIX for
conflicting purposes); it allowed the header to be continued
over multiple records; and it defined new entries that
modify following entries (similar in principle to the
<b>x</b> entry described above, but each GNU special entry
is single-purpose, unlike the general-purpose <b>x</b>
entry). As a result, GNU tar archives are not POSIX
compatible, although more lenient POSIX-compliant readers
can successfully extract most GNU tar archives.</p>

<p style="margin-left:14%; margin-top: 1em">struct
header_gnu_tar {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char name[100];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mode[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char uid[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char gid[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char size[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char mtime[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char checksum[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char typeflag[1];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char linkname[100];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char magic[6];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char version[2];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char uname[32];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char gname[32];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char devmajor[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char devminor[8];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char atime[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char ctime[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char offset[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char longnames[4];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char unused[1];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>struct {</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">
</td>
<td width="10%">


<p>char offset[12];</p></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">
</td>
<td width="10%">


<p>char numbytes[12];</p></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>} sparse[4];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char isextended[1];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char realsize[12];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
<tr valign="top" align="left">
<td width="24%"></td>
<td width="11%">


<p>char pad[17];</p></td>
<td width="10%"></td>
<td width="55%">
</td></tr>
</table>

<p style="margin-left:14%;">};</p>

<p style="margin-top: 1em"><i>typeflag</i></p>

<p style="margin-left:17%;">GNU tar uses the following
special entry types, in addition to those defined by
POSIX:</p>

<p style="margin-top: 1em">7</p>

<p style="margin-left:27%; margin-top: 1em">GNU tar treats
type &quot;7&quot; records identically to type &quot;0&quot;
records, except on one obscure RTOS where they are used to
indicate the pre-allocation of a contiguous file on
disk.</p>

<p style="margin-top: 1em">D</p>

<p style="margin-left:27%; margin-top: 1em">This indicates
a directory entry. Unlike the POSIX-standard &quot;5&quot;
typeflag, the header is followed by data records listing the
names of files in this directory. Each name is preceded by
an ASCII &quot;Y&quot; if the file is stored in this archive
or &quot;N&quot; if the file is not stored in this archive.
Each name is terminated with a null, and an extra null marks
the end of the name list. The purpose of this entry is to
support incremental backups; a program restoring from such
an archive may wish to delete files on disk that did not
exist in the directory when the archive was made.</p>

<p style="margin-left:27%; margin-top: 1em">Note that the
&quot;D&quot; typeflag specifically violates POSIX, which
requires that unrecognized typeflags be restored as normal
files. In this case, restoring the &quot;D&quot; entry as a
file could interfere with subsequent creation of the
like-named directory.</p>

<p style="margin-top: 1em">K</p>

<p style="margin-left:27%; margin-top: 1em">The data for
this entry is a long linkname for the following regular
entry.</p>

<p style="margin-top: 1em">L</p>

<p style="margin-left:27%; margin-top: 1em">The data for
this entry is a long pathname for the following regular
entry.</p>

<p style="margin-top: 1em">M</p>

<p style="margin-left:27%; margin-top: 1em">This is a
continuation of the last file on the previous volume. GNU
multi-volume archives guarantee that each volume begins with
a valid entry header. To ensure this, a file may be split,
with part stored at the end of one volume, and part stored
at the beginning of the next volume. The &quot;M&quot;
typeflag indicates that this entry continues an existing
file. Such entries can only occur as the first or second
entry in an archive (the latter only if the first entry is a
volume label). The <i>size</i> field specifies the size of
this entry. The <i>offset</i> field at bytes 369-380
specifies the offset where this file fragment begins. The
<i>realsize</i> field specifies the total size of the file
(which must equal <i>size</i> plus <i>offset</i>). When
extracting, GNU tar checks that the header file name is the
one it is expecting, that the header offset is in the
correct sequence, and that the sum of offset and size is
equal to realsize.</p>

<p style="margin-top: 1em">N</p>

<p style="margin-left:27%; margin-top: 1em">Type
&quot;N&quot; records are no longer generated by GNU tar.
They contained a list of files to be renamed or symlinked
after extraction; this was originally used to support long
names. The contents of this record are a text description of
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
archives.</p>

<p style="margin-top: 1em">S</p>

<p style="margin-left:27%; margin-top: 1em">This is a
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>

<p style="margin-top: 1em">V</p>

<p style="margin-left:27%; margin-top: 1em">The <i>name</i>
field should be interpreted as a tape/volume header name.
This entry should generally be ignored on extraction.</p>

<p style="margin-top: 1em"><i>magic</i></p>

<p style="margin-left:17%; margin-top: 1em">The magic field
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>

<p style="margin-top: 1em"><i>version</i></p>

<p style="margin-left:17%;">The version field holds a space
character followed by a null. Note that POSIX ustar archives
use two copies of the ASCII digit
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em"><i>atime</i>, <i>ctime</i></p>

<p style="margin-left:17%;">The time the file was last
accessed and the time of last change of file information,
stored in octal as with <i>mtime</i>.</p>

<p style="margin-top: 1em"><i>longnames</i></p>

<p style="margin-left:17%;">This field is apparently no
longer used.</p>

<p style="margin-top: 1em">Sparse <i>offset /
numbytes</i></p>

<p style="margin-left:17%;">Each such structure specifies a
single fragment of a sparse file. The two fields store
values as octal numbers. The fragments are each padded to a
multiple of 512 bytes in the archive. On extraction, the
list of fragments is collected from the header (including
any extension headers), and the data is then read and
written to the file at appropriate offsets.</p>

<p style="margin-top: 1em"><i>isextended</i></p>

<p style="margin-left:17%;">If this is set to non-zero, the
header will be followed by additional &rsquo;&rsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>

<p style="margin-left:24%; margin-top: 1em">struct
gnu_sparse_header {</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">


<p>struct {</p></td>
<td width="10%"></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">
</td>
<td width="10%">


<p>char offset[12];</p></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">
</td>
<td width="10%">


<p>char numbytes[12];</p></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">


<p>} sparse[21];</p></td>
<td width="10%"></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">


<p>char isextended[1];</p></td>
<td width="10%"></td>
<td width="45%">
</td></tr>
<tr valign="top" align="left">
<td width="35%"></td>
<td width="10%">


<p>char padding[7];</p></td>
<td width="10%"></td>
<td width="45%">
</td></tr>
</table>

<p style="margin-left:24%;">};</p>

<p style="margin-top: 1em"><i>realsize</i></p>

<p style="margin-left:17%;">A binary representation of the
file&rsquo;s complete size, with a much larger range than
the POSIX file size. In particular, with <b>M</b> type
files, the current entry is only a portion of the file. In
that case, the POSIX size field will indicate the size of
this entry; the <i>realsize</i> field will indicate the
total size of the file.</p>

<p style="margin-left:6%; margin-top: 1em"><b>GNU tar pax
archives</b> <br>
GNU tar 1.14 (XXX check this XXX) and later will write pax
interchange format archives when you specify the
<b>&minus;-posix</b> flag. This format follows the pax
interchange format closely, using some <b>SCHILY</b> tags
and introducing new keywords to store sparse file
information. There have been three iterations of the sparse
file support, referred to as
&rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>

<p style="margin-top: 1em"><b>GNU.sparse.numblocks</b>,
<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>,
<b>GNU.sparse.size</b></p>

<p style="margin-left:17%;">The
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
size of each block, and a single <b>GNU.sparse.size</b> to
indicate the full size of the file. This is not the same as
the size in the tar header because the latter value does not
include the size of any holes. This format required that the
order of attributes be preserved and relied on readers
accepting multiple appearances of the same attribute names,
which is not officially permitted by the standards.</p>

<p style="margin-top: 1em"><b>GNU.sparse.map</b></p>

<p style="margin-left:17%;">The
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
the archive is extracted by an archiver that does not
recognize this extension, since many pax implementations
simply discard unrecognized attributes.</p>

<p style="margin-top: 1em"><b>GNU.sparse.major</b>,
<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>,
<b>GNU.sparse.realsize</b></p>

<p style="margin-left:17%;">The
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
<b>GNU.sparse.minor</b> fields) and the full size of the
file. The <b>GNU.sparse.name</b> holds the true name of the
file. To avoid confusion, the name stored in the regular tar
header is a modified name so that extraction errors will be
apparent to users.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Solaris
Tar</b> <br>
XXX More Details Needed XXX</p>

<p style="margin-left:6%; margin-top: 1em">Solaris tar
(beginning with SunOS XXX 5.7 ?? XXX) supports an
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>

<p><b>&bull;</b></p>

<p style="margin-left:17%;">Extended attributes are stored
in an entry whose type is <b>X</b>, not <b>x</b>, as used by
pax interchange format. The detailed format of this entry
appears to be the same as detailed above for the <b>x</b>
entry.</p>

<p><b>&bull;</b></p>

<p style="margin-left:17%;">An additional <b>A</b> header
is used to store an ACL for the following regular entry. The
body of this entry contains a seven-digit octal number
followed by a zero byte, followed by the textual ACL
description. The octal value is the number of ACL entries
plus a constant that indicates the ACL type: 01000000 for
POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p>

<p style="margin-left:6%; margin-top: 1em"><b>AIX Tar</b>
<br>
XXX More details needed XXX</p>

<p style="margin-left:6%; margin-top: 1em">AIX Tar uses a
ustar-formatted header with the type <b>A</b> for storing
coded ACL information. Unlike the Solaris format, AIX tar
writes this header after the regular file body to which it
applies. The pathname in this header is either <b>NFS4</b>
or <b>AIXC</b> to indicate the type of ACL stored. The
actual ACL is stored in platform-specific binary format.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Mac OS X
Tar</b> <br>
The tar distributed with Apple&rsquo;s Mac OS X stores most
regular files as two separate files in the tar archive. The
two files have the same name except that the first one has
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
element. This special file stores an AppleDouble-encoded
binary blob with additional metadata about the second file,
including ACL, extended attributes, and resources. To
recreate the original file on disk, each separate file can
be extracted and the Mac OS X <b>copyfile</b>() function can
be used to unpack the separate metadata file and apply it to
th regular file. Conversely, the same function provides a
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
extended metadata from a file into a separate file whose
contents can then be put into a tar archive.</p>

<p style="margin-left:6%; margin-top: 1em">Note that the
Apple extended attributes interact badly with long
filenames. Since each file is stored with the full name, a
separate set of extensions needs to be included in the
archive for each one, doubling the overhead required for
files with long names.</p>

<p style="margin-left:6%; margin-top: 1em"><b>Summary of
tar type codes</b> <br>
The following list is a condensed summary of the type codes
used in tar header records generated by different tar
implementations. More details about specific implementations
can be found above:</p>

<p>NUL</p>

<p style="margin-left:13%; margin-top: 1em">Early tar
programs stored a zero byte for regular files.</p>

<p><b>0</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a regular file.</p>

<p><b>1</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a hard link description.</p>

<p><b>2</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a symbolic link description.</p>

<p><b>3</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a character device node.</p>

<p><b>4</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a block device node.</p>

<p><b>5</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a directory.</p>

<p><b>6</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX standard
type code for a FIFO.</p>

<p><b>7</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX
reserved.</p>

<p><b>7</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar used
for pre-allocated files on some systems.</p>

<p><b>A</b></p>

<p style="margin-left:13%; margin-top: 1em">Solaris tar ACL
description stored prior to a regular file header.</p>

<p><b>A</b></p>

<p style="margin-left:13%; margin-top: 1em">AIX tar ACL
description stored after the file body.</p>

<p><b>D</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar
directory dump.</p>

<p><b>K</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar long
linkname for the following header.</p>

<p><b>L</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar long
pathname for the following header.</p>

<p><b>M</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar
multivolume marker, indicating the file is a continuation of
a file from the previous volume.</p>

<p><b>N</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar long
filename support. Deprecated.</p>

<p><b>S</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar sparse
regular file.</p>

<p><b>V</b></p>

<p style="margin-left:13%; margin-top: 1em">GNU tar
tape/volume header name.</p>

<p><b>X</b></p>

<p style="margin-left:13%; margin-top: 1em">Solaris tar
general-purpose extension header.</p>

<p><b>g</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX pax
interchange format global extensions.</p>

<p><b>x</b></p>

<p style="margin-left:13%; margin-top: 1em">POSIX pax
interchange format per-file extensions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">ar(1), pax(1), tar(1)</p>

<p style="margin-top: 1em"><b>STANDARDS</b></p>

<p style="margin-left:6%;">The <b>tar</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>

<p style="margin-top: 1em"><b>HISTORY</b></p>

<p style="margin-left:6%;">A <b>tar</b> command appeared in
Seventh Edition Unix, which was released in January, 1979.
It replaced the <b>tp</b> program from Fourth Edition Unix
which in turn replaced the <b>tap</b> program from First
Edition Unix. John Gilmore&rsquo;s <b>pdtar</b>
public-domain implementation (circa 1987) was highly
influential and formed the basis of <b>GNU tar</b> (circa
1988). Joerg Shilling&rsquo;s <b>star</b> archiver is
another open-source (CDDL) archiver (originally developed
circa 1985) which features complete support for pax
interchange format.</p>

<p style="margin-left:6%; margin-top: 1em">This
documentation was written as part of the <b>libarchive</b>
and <b>bsdtar</b> project by Tim Kientzle
&lt;kientzle@@FreeBSD.org&gt;.</p>

<p style="margin-left:6%; margin-top: 1em">BSD
December&nbsp;23, 2011 BSD</p>
<hr>
</body>
</html>
@


1.1.1.6
log
@Import libarchive-3.3.1.
@
text
@d2 1
a2 1
<!-- CreationDate: Sat Feb 25 11:22:08 2017 -->
d53 1
a53 1
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
d59 2
a60 2
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
d227 1
a227 1
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
d242 1
a242 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
d249 1
a249 1
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
d258 1
a258 1
five characters &lsquo;&lsquo;ustar&rsquo;&rsquo; followed
d276 1
a276 1
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
d279 1
a279 1
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
d281 1
a281 1
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
d435 1
a435 1
<p>&lsquo;&lsquo;0&rsquo;&rsquo;</p>
d441 1
a441 1
<p>&lsquo;&lsquo;1&rsquo;&rsquo;</p>
d445 1
a445 1
<p>&lsquo;&lsquo;2&rsquo;&rsquo;</p>
d450 1
a450 1
<p>&lsquo;&lsquo;3&rsquo;&rsquo;</p>
d455 1
a455 1
<p>&lsquo;&lsquo;4&rsquo;&rsquo;</p>
d460 1
a460 1
<p>&lsquo;&lsquo;5&rsquo;&rsquo;</p>
d464 1
a464 1
<p>&lsquo;&lsquo;6&rsquo;&rsquo;</p>
d468 1
a468 1
<p>&lsquo;&lsquo;7&rsquo;&rsquo;</p>
d496 1
a496 1
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
d504 1
a504 1
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
d592 2
a593 2
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
d598 2
a599 2
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
d644 1
a644 1
&lsquo;&lsquo;BINARY&rsquo;&rsquo;, then all textual values
d647 2
a648 2
key: &lsquo;&lsquo;BINARY&rsquo;&rsquo; or
&lsquo;&lsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
d695 1
a695 1
<b>SCHILY.acl.default, SCHILY.acl.ace</b></p>
d697 8
a704 9
<p style="margin-left:17%;">Stores the access, default and
NFSv4 ACLs as textual strings in a format that is an
extension of the format specified by POSIX.1e draft 17. In
particular, each user or group access specification can
include an additional colon-separated field with the numeric
UID or GID. This allows ACLs to be restored on systems that
may not have complete user or group information available
(such as when NIS/YP or LDAP services are temporarily
unavailable).</p>
d741 1
a741 1
&lsquo;&lsquo;ctime&rsquo;&rsquo; attribute, which refers to
d751 3
a753 3
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
d1139 2
a1140 2
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
d1149 1
a1149 1
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
d1153 1
a1153 1
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
d1155 1
a1155 1
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>
d1166 1
a1166 1
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
d1175 1
a1175 1
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>
d1202 1
a1202 1
header will be followed by additional &lsquo;&lsquo;sparse
d1291 3
a1293 3
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>
d1300 1
a1300 1
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
d1315 1
a1315 1
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
d1328 1
a1328 1
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
d1344 1
a1344 1
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
d1383 1
a1383 1
&lsquo;&lsquo;._&rsquo;&rsquo; prepended to the last path
d1391 1
a1391 1
&lsquo;&lsquo;pack&rsquo;&rsquo; option to encode the
d1529 1
a1529 1
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
d1533 1
a1533 1
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>
d1555 1
a1555 1
December&nbsp;27, 2016 BSD</p>
@


1.1.1.7
log
@Import libarchive-3.3.2 + 9de5f3 + f9dacbf:
- Support NFS4 ACLs on Linux
- Bugfixes
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jul 10 02:32:58 2017 -->
d53 1
a53 1
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
d59 2
a60 2
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
d227 1
a227 1
an ASCII &rsquo;1&rsquo; and the <i>linkname</i> field holds
d242 1
a242 1
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
d249 1
a249 1
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
d258 1
a258 1
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
d276 1
a276 1
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
d279 1
a279 1
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
d281 1
a281 1
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
d435 1
a435 1
<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>
d441 1
a441 1
<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>
d445 1
a445 1
<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>
d450 1
a450 1
<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>
d455 1
a455 1
<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>
d460 1
a460 1
<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>
d464 1
a464 1
<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>
d468 1
a468 1
<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>
d496 1
a496 1
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
d504 1
a504 1
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
d592 2
a593 2
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
d598 2
a599 2
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
d644 1
a644 1
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
d647 2
a648 2
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
d742 1
a742 1
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
d752 3
a754 3
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
d1140 2
a1141 2
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
d1150 1
a1150 1
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
d1154 1
a1154 1
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
d1156 1
a1156 1
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>
d1167 1
a1167 1
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
d1176 1
a1176 1
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>
d1203 1
a1203 1
header will be followed by additional &rsquo;&rsquo;sparse
d1287 8
a1294 7
<b>--posix</b> flag. This format follows the pax interchange
format closely, using some <b>SCHILY</b> tags and
introducing new keywords to store sparse file information.
There have been three iterations of the sparse file support,
referred to as &rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>
d1301 1
a1301 1
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
d1316 1
a1316 1
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
d1329 1
a1329 1
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
d1345 1
a1345 1
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
d1384 1
a1384 1
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
d1392 1
a1392 1
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
d1530 1
a1530 1
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
d1534 1
a1534 1
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
@


1.1.1.8
log
@Import libarchive-3.3.3 as should have done originally.
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep  3 22:55:10 2018 -->
@


1.1.1.9
log
@Import libarchive 3.4.0
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
d53 2
a54 2
&ldquo;blocks&rdquo; are always a multiple of the record
size. The maximum block size supported by early
d58 5
a62 4
high-speed tape drives. (Note: the terms &ldquo;block&rdquo;
and &ldquo;record&rdquo; here are not entirely standard;
this document follows the convention established by John
Gilmore in documenting <b>pdtar</b>.)</p>
d242 3
a244 3
(&ldquo;POSIX.1&rdquo;) standard was released. For best
portability, modern implementations should fill the numeric
fields with leading zeros.</p>
d249 5
a253 5
(&ldquo;POSIX.1&rdquo;) served as the basis for John
Gilmore&rsquo;s <b>pdtar</b> program and many system
implementations from the late 1980s and early 1990s. These
archives generally follow the POSIX ustar format described
below with the following variations:</p>
d258 3
a260 3
five characters &ldquo;ustar&rdquo; followed by a space. The
version field contains a space character followed by a
null.</p>
d276 7
a282 7
IEEE Std 1003.1-1988 (&ldquo;POSIX.1&rdquo;) defined a
standard tar file format to be read and written by compliant
implementations of tar(1). This format is often called the
&ldquo;ustar&rdquo; format, after the magic value used in
the header. (The name is an acronym for &ldquo;Unix Standard
TAR&rdquo;.) It extends the historic format with new
fields:</p>
d435 1
a435 1
<p>&ldquo;0&rdquo;</p>
d441 1
a441 1
<p>&ldquo;1&rdquo;</p>
d445 1
a445 1
<p>&ldquo;2&rdquo;</p>
d450 1
a450 1
<p>&ldquo;3&rdquo;</p>
d455 1
a455 1
<p>&ldquo;4&rdquo;</p>
d460 1
a460 1
<p>&ldquo;5&rdquo;</p>
d464 1
a464 1
<p>&ldquo;6&rdquo;</p>
d468 1
a468 1
<p>&ldquo;7&rdquo;</p>
d496 4
a499 4
magic value &ldquo;ustar&rdquo; followed by a NUL byte to
indicate that this is a POSIX standard archive. Full
compliance requires the uname and gname fields be properly
set.</p>
d504 2
a505 2
&ldquo;00&rdquo; (two copies of the ASCII digit zero) for
POSIX standard archives.</p>
d592 11
a602 10
(&ldquo;POSIX.1&rdquo;) defined a &ldquo;pax interchange
format&rdquo; that uses two new types of entries to hold
text-formatted metadata that applies to following entries.
Note that a pax interchange format archive is a ustar
archive in every respect. The new data is stored in
ustar-compatible archive entries that use the
&ldquo;x&rdquo; or &ldquo;g&rdquo; typeflag. In particular,
older implementations that do not fully support these
extensions will extract the metadata into regular files,
where the metadata can be examined as necessary.</p>
d643 11
a653 10
six-character ASCII string &ldquo;BINARY&rdquo;, then all
textual values are assumed to be in a platform-dependent
multi-byte encoding. Note that there are only two valid
values for this key: &ldquo;BINARY&rdquo; or
&ldquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rdquo;. No
other values are permitted by the standard, and the latter
value should generally not be used as it is the default when
this key is not specified. In particular, this flag should
not be used as a general mechanism to allow filenames to be
stored in arbitrary encodings.</p>
d742 2
a743 2
&ldquo;ctime&rdquo; attribute, which refers to the time when
the file metadata was last changed.)</p>
d751 7
a757 5
characters and the two special characters &ldquo;=&rdquo;
and &ldquo;%&rdquo; are encoded as &ldquo;%&rdquo; followed
by two uppercase hexadecimal digits. The value of this key
is the extended attribute value encoded in base 64. XXX
Detail the base-64 format here XXX</p>
d1140 6
a1145 5
the operations to be done, in the form &ldquo;Rename %s to
%s\n&rdquo; or &ldquo;Symlink %s to %s\n&rdquo;; in either
case, both filenames are escaped using K&amp;R C syntax. Due
to security concerns, &quot;N&quot; records are now
generally ignored when reading archives.</p>
d1150 7
a1156 6
&ldquo;sparse&rdquo; regular file. Sparse files are stored
as a series of fragments. The header contains a list of
fragment offset/length pairs. If more than four such entries
are required, the header is extended as necessary with
&ldquo;extra&rdquo; header extensions (an older format that
is no longer used), or &ldquo;sparse&rdquo; extensions.</p>
d1167 3
a1169 3
holds the five characters &ldquo;ustar&rdquo; followed by a
space. Note that POSIX ustar archives have a trailing
null.</p>
d1175 2
a1176 1
use two copies of the ASCII digit &ldquo;0&rdquo;.</p>
d1203 4
a1206 4
header will be followed by additional &ldquo;sparse
header&rdquo; records. Each such record contains information
about as many as 21 additional sparse blocks as shown
here:</p>
d1291 3
a1293 2
referred to as &ldquo;0.0&rdquo;, &ldquo;0.1&rdquo;, and
&ldquo;1.0&rdquo;.</p>
d1299 12
a1310 12
<p style="margin-left:17%;">The &ldquo;0.0&rdquo; format
used an initial <b>GNU.sparse.numblocks</b> attribute to
indicate the number of blocks in the file, a pair of
<b>GNU.sparse.offset</b> and <b>GNU.sparse.numbytes</b> to
indicate the offset and size of each block, and a single
<b>GNU.sparse.size</b> to indicate the full size of the
file. This is not the same as the size in the tar header
because the latter value does not include the size of any
holes. This format required that the order of attributes be
preserved and relied on readers accepting multiple
appearances of the same attribute names, which is not
officially permitted by the standards.</p>
d1314 8
a1321 7
<p style="margin-left:17%;">The &ldquo;0.1&rdquo; format
used a single attribute that stored a comma-separated list
of decimal numbers. Each pair of numbers indicated the
offset and size, respectively, of a block of data. This does
not work well if the archive is extracted by an archiver
that does not recognize this extension, since many pax
implementations simply discard unrecognized attributes.</p>
d1327 10
a1336 9
<p style="margin-left:17%;">The &ldquo;1.0&rdquo; format
stores the sparse block map in one or more 512-byte blocks
prepended to the file data in the entry body. The pax
attributes indicate the existence of this map (via the
<b>GNU.sparse.major</b> and <b>GNU.sparse.minor</b> fields)
and the full size of the file. The <b>GNU.sparse.name</b>
holds the true name of the file. To avoid confusion, the
name stored in the regular tar header is a modified name so
that extraction errors will be apparent to users.</p>
d1344 3
a1346 3
&ldquo;extended&rdquo; format that is fundamentally similar
to pax interchange format, with the following
differences:</p>
d1383 11
a1393 11
&ldquo;._&rdquo; prepended to the last path element. This
special file stores an AppleDouble-encoded binary blob with
additional metadata about the second file, including ACL,
extended attributes, and resources. To recreate the original
file on disk, each separate file can be extracted and the
Mac OS X <b>copyfile</b>() function can be used to unpack
the separate metadata file and apply it to th regular file.
Conversely, the same function provides a &ldquo;pack&rdquo;
option to encode the extended metadata from a file into a
separate file whose contents can then be put into a tar
archive.</p>
d1529 5
a1533 5
(&ldquo;SUSv2&rdquo;). It has been supplanted in subsequent
standards by pax(1). The ustar format is currently part of
the specification for the pax(1) utility. The pax
interchange file format is new with IEEE Std 1003.1-2001
(&ldquo;POSIX.1&rdquo;).</p>
@


1.1.1.10
log
@Import libarchive 3.7.2
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
d692 1
a692 1
<b>SCHILY.acl.default</b>, <b>SCHILY.acl.ace</b></p>
d719 2
a720 2
<p style="margin-top: 1em"><b>SCHILY.dev</b>,
<b>SCHILY.ino</b>, <b>SCHILY.nlinks</b></p>
d743 1
a743 1
<p style="margin-top: 1em"><b>LIBARCHIVE.xattr</b>.<i>namespace</i>.<i>key</i></p>
@


1.1.1.11
log
@libarchive: import version 3.7.3
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Apr  7 22:36:28 2024 -->
@


1.1.1.12
log
@Libarchive 3.7.4 is a bugfix and security release

Security fixes:

rar: Fix OOB in rar e8 filter (CVE-2024-26256)
zip: Fix out of boundary access

Important bugfixes:

7zip: Limit amount of properties
bsdtar: Fix error handling around strtol() usages
passphrase: Improve newline handling on Windows
passphrase: Never allow empty passwords
rar: Fix "File CRC Error" when extracting specific rar4 archives
xar: Avoid infinite link loop
zip: Update AppleDouble support for directories
zstd: Implement core detection
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Apr 26 09:23:48 2024 -->
@


1.1.1.13
log
@libarchive: imported version 3.7.5

Libarchive 3.7.5

Security fixes:

fix multiple vulnerabilities identified by SAST
cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
lzop: prevent integer overflow
rar4: protect copy_from_lzss_window_to_unp()
rar4: fix CVE-2024-26256
rar4: fix OOB in delta and audio filter
rar4: fix out of boundary access with large files
rar4: add boundary checks to rgb filter
rar4: fix OOB access with unicode filenames
rar5: clear 'data ready' cache on window buffer reallocs
rpm: calculate huge header sizes correctly
unzip: unify EOF handling
util: fix out of boundary access in mktemp functions
uu: stop processing if lines are too long

Important bugfixes:

7zip: fix issue when skipping first file in 7zip archive that is a multiple of 65536 bytes
ar: fix archive entries having no type
lha: do not allow negative file sizes
lha: fix integer truncation on 32-bit systems
shar: check strdup return value
rar5: don't try to read rediculously long names
xar: fix another infinite loop and expat error handling
many Windows fixes, cleanups and improvements
@
text
@d2 1
a2 1
<!-- CreationDate: Fri Sep 13 20:31:07 2024 -->
@


1.1.1.14
log
@libarchove: import version 3.7.7
@
text
@d1 2
a2 2
<!-- Creator     : groff version 1.23.0 -->
<!-- CreationDate: Sun Oct 13 08:12:11 2024 -->
d23 1
a23 1
<p><i>TAR</i>(5) File Formats Manual <i>TAR</i>(5)</p>
d27 2
a28 2
<p style="margin-left:9%;">tar &mdash; format of tape
archive files</p>
d32 1
a32 1
<p style="margin-left:9%;">The <b>tar</b> archive format
d40 8
a47 2
<p style="margin-left:4%; margin-top: 1em"><b>General
Format</b></p>
d49 1
a49 9
<p style="margin-left:9%;">A <b>tar</b> archive consists of
a series of 512-byte records. Each file system object
requires a header record which stores basic metadata
(pathname, owner, permissions, etc.) and zero or more
records containing any file data. The end of the archive is
indicated by two records consisting entirely of zero
bytes.</p>

<p style="margin-left:9%; margin-top: 1em">For
d63 8
a70 9
<p style="margin-left:4%; margin-top: 1em"><b>Old-Style
Archive Format</b></p>

<p style="margin-left:9%;">The original tar archive format
has been extended many times to include additional
information that various implementors found necessary. This
section describes the variant implemented by the tar command
included in Version&nbsp;7 AT&amp;T UNIX, which seems to be
the earliest widely-used version of the tar program.</p>
d72 1
a72 1
<p style="margin-left:9%; margin-top: 1em">The header
d76 1
a76 1
<p style="margin-left:17%; margin-top: 1em">struct
d82 2
a83 2
<td width="27%"></td>
<td width="10%">
d87 1
a87 1
<td width="63%">
d90 2
a91 2
<td width="27%"></td>
<td width="10%">
d95 1
a95 1
<td width="63%">
d98 2
a99 2
<td width="27%"></td>
<td width="10%">
d103 1
a103 1
<td width="63%">
d106 2
a107 2
<td width="27%"></td>
<td width="10%">
d111 1
a111 1
<td width="63%">
d114 2
a115 2
<td width="27%"></td>
<td width="10%">
d119 1
a119 1
<td width="63%">
d122 2
a123 2
<td width="27%"></td>
<td width="10%">
d127 1
a127 1
<td width="63%">
d130 2
a131 2
<td width="27%"></td>
<td width="10%">
d135 1
a135 1
<td width="63%">
d138 2
a139 2
<td width="27%"></td>
<td width="10%">
d143 1
a143 1
<td width="63%">
d146 2
a147 2
<td width="27%"></td>
<td width="10%">
d151 1
a151 1
<td width="63%">
d154 2
a155 2
<td width="27%"></td>
<td width="10%">
d159 1
a159 1
<td width="63%">
d163 1
a163 1
<p style="margin-left:17%;">};</p>
d165 1
a165 1
<p style="margin-left:9%;">All unused bytes in the header
d170 1
a170 1
<p style="margin-left:19%; margin-top: 1em">Pathname,
d180 1
a180 1
<p style="margin-left:19%; margin-top: 1em">File mode,
d185 1
a185 1
<p style="margin-left:19%;">User id and group id of owner,
d190 1
a190 1
<p style="margin-left:19%; margin-top: 1em">Size of file,
d199 1
a199 1
<p style="margin-left:19%; margin-top: 1em">Modification
d207 1
a207 1
<p style="margin-left:19%;">Header checksum, stored as an
d222 1
a222 1
<p style="margin-left:19%;">In order to preserve hardlinks
d226 1
a226 1
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
d231 1
a231 1
<p style="margin-left:9%; margin-top: 1em">Early tar
d245 5
a249 6
<p style="margin-left:4%; margin-top: 1em"><b>Pre-POSIX
Archives</b></p>

<p style="margin-left:9%;">An early draft of IEEE Std
1003.1-1988 (&ldquo;POSIX.1&rdquo;) served as the basis for
John Gilmore&rsquo;s <b>pdtar</b> program and many system
d256 1
a256 1
<p style="margin-left:19%;">The magic value consists of the
d263 1
a263 1
<p style="margin-left:19%;">The numeric fields are
d269 1
a269 1
<p style="margin-left:19%;">The prefix field is often not
d273 5
a277 7
<p style="margin-left:4%; margin-top: 1em"><b>POSIX ustar
Archives</b></p>

<p style="margin-left:9%;">IEEE Std 1003.1-1988
(&ldquo;POSIX.1&rdquo;) defined a standard tar file format
to be read and written by compliant implementations of
<i>tar</i>(1). This format is often called the
d283 1
a283 1
<p style="margin-left:17%; margin-top: 1em">struct
d289 2
a290 2
<td width="27%"></td>
<td width="10%">
d294 1
a294 1
<td width="63%">
d297 2
a298 2
<td width="27%"></td>
<td width="10%">
d302 1
a302 1
<td width="63%">
d305 2
a306 2
<td width="27%"></td>
<td width="10%">
d310 1
a310 1
<td width="63%">
d313 2
a314 2
<td width="27%"></td>
<td width="10%">
d318 1
a318 1
<td width="63%">
d321 2
a322 2
<td width="27%"></td>
<td width="10%">
d326 1
a326 1
<td width="63%">
d329 2
a330 2
<td width="27%"></td>
<td width="10%">
d334 1
a334 1
<td width="63%">
d337 2
a338 2
<td width="27%"></td>
<td width="10%">
d342 1
a342 1
<td width="63%">
d345 2
a346 2
<td width="27%"></td>
<td width="10%">
d350 1
a350 1
<td width="63%">
d353 2
a354 2
<td width="27%"></td>
<td width="10%">
d358 1
a358 1
<td width="63%">
d361 2
a362 2
<td width="27%"></td>
<td width="10%">
d366 1
a366 1
<td width="63%">
d369 2
a370 2
<td width="27%"></td>
<td width="10%">
d374 1
a374 1
<td width="63%">
d377 2
a378 2
<td width="27%"></td>
<td width="10%">
d382 1
a382 1
<td width="63%">
d385 2
a386 2
<td width="27%"></td>
<td width="10%">
d390 1
a390 1
<td width="63%">
d393 2
a394 2
<td width="27%"></td>
<td width="10%">
d398 1
a398 1
<td width="63%">
d401 2
a402 2
<td width="27%"></td>
<td width="10%">
d406 1
a406 1
<td width="63%">
d409 2
a410 2
<td width="27%"></td>
<td width="10%">
d414 1
a414 1
<td width="63%">
d417 2
a418 2
<td width="27%"></td>
<td width="10%">
d422 1
a422 1
<td width="63%">
d426 1
a426 1
<p style="margin-left:17%;">};</p>
d430 1
a430 1
<p style="margin-left:19%;">Type of entry. POSIX extended
d436 1
a436 1
<p style="margin-left:29%; margin-top: 1em">Regular file.
d442 1
a442 1
<p style="margin-left:29%; margin-top: 1em">Hard link.</p>
d446 1
a446 1
<p style="margin-left:29%; margin-top: 1em">Symbolic
d451 1
a451 1
<p style="margin-left:29%; margin-top: 1em">Character
d456 1
a456 1
<p style="margin-left:29%; margin-top: 1em">Block device
d461 1
a461 1
<p style="margin-left:29%; margin-top: 1em">Directory.</p>
d465 1
a465 1
<p style="margin-left:29%; margin-top: 1em">FIFO node.</p>
d469 1
a469 1
<p style="margin-left:29%; margin-top: 1em">Reserved.</p>
d473 1
a473 1
<p style="margin-left:29%; margin-top: 1em">A
d483 1
a483 1
<p style="margin-left:19%;">It is worth noting that the
d494 1
a494 1
<p style="margin-left:19%; margin-top: 1em">Contains the
d502 1
a502 1
<p style="margin-left:19%;">Version. This should be
d508 1
a508 1
<p style="margin-left:19%;">User and group names, as
d516 1
a516 1
<p style="margin-left:19%;">Major and minor numbers for
d521 1
a521 1
<p style="margin-left:19%;">If the pathname is too long to
d532 1
a532 1
<p style="margin-left:9%; margin-top: 1em">Note that all
d535 1
a535 1
<p style="margin-left:9%; margin-top: 1em">Field
d547 1
a547 1
<p style="margin-left:9%; margin-top: 1em">Currently, most
d552 5
a556 6
<p style="margin-left:4%; margin-top: 1em"><b>Numeric
Extensions</b></p>

<p style="margin-left:9%;">There have been several attempts
to extend the range of sizes or times supported by modifying
how numbers are stored in the header.</p>
d558 1
a558 1
<p style="margin-left:9%; margin-top: 1em">One obvious
d566 1
a566 1
<p style="margin-left:9%; margin-top: 1em">Another
d582 1
a582 1
<p style="margin-left:9%; margin-top: 1em">Another early
d587 9
a595 10
<p style="margin-left:4%; margin-top: 1em"><b>Pax
Interchange Format</b></p>

<p style="margin-left:9%;">There are many attributes that
cannot be portably stored in a POSIX ustar archive. IEEE Std
1003.1-2001 (&ldquo;POSIX.1&rdquo;) defined a &ldquo;pax
interchange format&rdquo; that uses two new types of entries
to hold text-formatted metadata that applies to following
entries. Note that a pax interchange format archive is a
ustar archive in every respect. The new data is stored in
d602 1
a602 1
<p style="margin-left:9%; margin-top: 1em">An entry in a
d617 1
a617 2
<p style="margin-left:17%;"><b>25
ctime=1084839148.1212\n</b></p>
d619 1
a619 1
<p style="margin-left:9%;">Keys in all lowercase are
d629 1
a629 1
<p style="margin-left:19%;">File access, inode change, and
d635 1
a635 1
<p style="margin-left:19%;">The character set used by the
d655 1
a655 1
<p style="margin-left:19%;">User name, group name, and
d663 1
a663 1
<p style="margin-left:19%;">The full path of the linked-to
d669 1
a669 1
<p style="margin-left:19%; margin-top: 1em">The full
d676 1
a676 1
<p style="margin-left:19%;">These keys are reserved and may
d681 1
a681 1
<p style="margin-left:19%; margin-top: 1em">The size of the
d688 1
a688 1
<p style="margin-left:19%;">Vendor-specific attributes used
d694 1
a694 1
<p style="margin-left:19%;">Stores the access, default and
d707 1
a707 1
<p style="margin-left:19%;">The full minor and major
d712 1
a712 1
<p style="margin-left:19%;">The file flags.</p>
d716 1
a716 1
<p style="margin-left:19%;">The full size of the file on
d722 1
a722 1
<p style="margin-left:19%;">The device number, inode
d730 1
a730 1
<p style="margin-left:19%;">Vendor-specific attributes used
d737 1
a737 1
<p style="margin-left:19%;">The time when the file was
d745 1
a745 1
<p style="margin-left:19%;">Libarchive stores
d756 1
a756 1
<p style="margin-left:19%;">XXX document other
d759 1
a759 1
<p style="margin-left:9%; margin-top: 1em">Any values
d773 1
a773 1
<p style="margin-left:9%; margin-top: 1em">In addition to
d780 1
a780 1
<p style="margin-left:9%; margin-top: 1em">Besides the new
d791 14
a804 16
<p style="margin-left:4%; margin-top: 1em"><b>GNU Tar
Archives</b></p>

<p style="margin-left:9%;">The GNU tar program started with
a pre-POSIX format similar to that described earlier and has
extended it using several different mechanisms: It added new
fields to the empty space in the header (some of which was
later used by POSIX for conflicting purposes); it allowed
the header to be continued over multiple records; and it
defined new entries that modify following entries (similar
in principle to the <b>x</b> entry described above, but each
GNU special entry is single-purpose, unlike the
general-purpose <b>x</b> entry). As a result, GNU tar
archives are not POSIX compatible, although more lenient
POSIX-compliant readers can successfully extract most GNU
tar archives.</p>
d806 1
a806 1
<p style="margin-left:17%; margin-top: 1em">struct
d812 2
a813 2
<td width="27%"></td>
<td width="10%">
d818 1
a818 1
<td width="53%">
d821 2
a822 2
<td width="27%"></td>
<td width="10%">
d827 1
a827 1
<td width="53%">
d830 2
a831 2
<td width="27%"></td>
<td width="10%">
d836 1
a836 1
<td width="53%">
d839 2
a840 2
<td width="27%"></td>
<td width="10%">
d845 1
a845 1
<td width="53%">
d848 2
a849 2
<td width="27%"></td>
<td width="10%">
d854 1
a854 1
<td width="53%">
d857 2
a858 2
<td width="27%"></td>
<td width="10%">
d863 1
a863 1
<td width="53%">
d866 2
a867 2
<td width="27%"></td>
<td width="10%">
d872 1
a872 1
<td width="53%">
d875 2
a876 2
<td width="27%"></td>
<td width="10%">
d881 1
a881 1
<td width="53%">
d884 2
a885 2
<td width="27%"></td>
<td width="10%">
d890 1
a890 1
<td width="53%">
d893 2
a894 2
<td width="27%"></td>
<td width="10%">
d899 1
a899 1
<td width="53%">
d902 2
a903 2
<td width="27%"></td>
<td width="10%">
d908 1
a908 1
<td width="53%">
d911 2
a912 2
<td width="27%"></td>
<td width="10%">
d917 1
a917 1
<td width="53%">
d920 2
a921 2
<td width="27%"></td>
<td width="10%">
d926 1
a926 1
<td width="53%">
d929 2
a930 2
<td width="27%"></td>
<td width="10%">
d935 1
a935 1
<td width="53%">
d938 2
a939 2
<td width="27%"></td>
<td width="10%">
d944 1
a944 1
<td width="53%">
d947 2
a948 2
<td width="27%"></td>
<td width="10%">
d953 1
a953 1
<td width="53%">
d956 2
a957 2
<td width="27%"></td>
<td width="10%">
d962 1
a962 1
<td width="53%">
d965 2
a966 2
<td width="27%"></td>
<td width="10%">
d971 1
a971 1
<td width="53%">
d974 2
a975 2
<td width="27%"></td>
<td width="10%">
d980 1
a980 1
<td width="53%">
d983 2
a984 2
<td width="27%"></td>
<td width="10%">
d989 1
a989 1
<td width="53%">
d992 2
a993 2
<td width="27%"></td>
<td width="10%">
d998 1
a998 1
<td width="53%">
d1001 2
a1002 2
<td width="27%"></td>
<td width="10%">
d1008 1
a1008 1
<td width="53%">
d1011 2
a1012 2
<td width="27%"></td>
<td width="10%">
d1018 1
a1018 1
<td width="53%">
d1021 2
a1022 2
<td width="27%"></td>
<td width="10%">
d1027 1
a1027 1
<td width="53%">
d1030 2
a1031 2
<td width="27%"></td>
<td width="10%">
d1036 1
a1036 1
<td width="53%">
d1039 2
a1040 2
<td width="27%"></td>
<td width="10%">
d1045 1
a1045 1
<td width="53%">
d1048 2
a1049 2
<td width="27%"></td>
<td width="10%">
d1054 1
a1054 1
<td width="53%">
d1058 1
a1058 1
<p style="margin-left:17%;">};</p>
d1062 1
a1062 1
<p style="margin-left:19%;">GNU tar uses the following
d1068 1
a1068 1
<p style="margin-left:29%; margin-top: 1em">GNU tar treats
d1076 1
a1076 1
<p style="margin-left:29%; margin-top: 1em">This indicates
d1088 1
a1088 1
<p style="margin-left:29%; margin-top: 1em">Note that the
d1097 1
a1097 1
<p style="margin-left:29%; margin-top: 1em">The data for
d1103 1
a1103 1
<p style="margin-left:29%; margin-top: 1em">The data for
d1109 1
a1109 1
<p style="margin-left:29%; margin-top: 1em">This is a
d1130 1
a1130 1
<p style="margin-left:29%; margin-top: 1em">Type
d1143 1
a1143 1
<p style="margin-left:29%; margin-top: 1em">This is a
d1153 1
a1153 1
<p style="margin-left:29%; margin-top: 1em">The <i>name</i>
d1159 1
a1159 1
<p style="margin-left:19%; margin-top: 1em">The magic field
d1166 1
a1166 1
<p style="margin-left:19%;">The version field holds a space
d1172 1
a1172 1
<p style="margin-left:19%;">The time the file was last
d1178 1
a1178 1
<p style="margin-left:19%;">This field is apparently no
d1184 1
a1184 1
<p style="margin-left:19%;">Each such structure specifies a
d1194 1
a1194 1
<p style="margin-left:19%;">If this is set to non-zero, the
d1200 1
a1200 1
<p style="margin-left:27%; margin-top: 1em">struct
d1206 1
a1206 1
<td width="37%"></td>
d1211 2
a1212 2
<td width="11%"></td>
<td width="42%">
d1215 1
a1215 1
<td width="37%"></td>
d1218 1
a1218 1
<td width="11%">
d1222 1
a1222 1
<td width="42%">
d1225 1
a1225 1
<td width="37%"></td>
d1228 1
a1228 1
<td width="11%">
d1232 1
a1232 1
<td width="42%">
d1235 1
a1235 1
<td width="37%"></td>
d1240 2
a1241 2
<td width="11%"></td>
<td width="42%">
d1244 1
a1244 1
<td width="37%"></td>
d1249 2
a1250 2
<td width="11%"></td>
<td width="42%">
d1253 1
a1253 1
<td width="37%"></td>
d1258 2
a1259 2
<td width="11%"></td>
<td width="42%">
d1263 1
a1263 1
<p style="margin-left:27%;">};</p>
d1267 1
a1267 1
<p style="margin-left:19%;">A binary representation of the
d1275 10
a1284 11
<p style="margin-left:4%; margin-top: 1em"><b>GNU tar pax
archives</b></p>

<p style="margin-left:9%;">GNU tar 1.14 (XXX check this
XXX) and later will write pax interchange format archives
when you specify the <b>--posix</b> flag. This format
follows the pax interchange format closely, using some
<b>SCHILY</b> tags and introducing new keywords to store
sparse file information. There have been three iterations of
the sparse file support, referred to as &ldquo;0.0&rdquo;,
&ldquo;0.1&rdquo;, and &ldquo;1.0&rdquo;.</p>
d1290 1
a1290 1
<p style="margin-left:19%;">The &ldquo;0.0&rdquo; format
d1305 1
a1305 1
<p style="margin-left:19%;">The &ldquo;0.1&rdquo; format
d1317 1
a1317 1
<p style="margin-left:19%;">The &ldquo;1.0&rdquo; format
d1327 3
a1329 4
<p style="margin-left:4%; margin-top: 1em"><b>Solaris
Tar</b></p>

<p style="margin-left:9%;">XXX More Details Needed XXX</p>
d1331 1
a1331 1
<p style="margin-left:9%; margin-top: 1em">Solaris tar
d1339 1
a1339 1
<p style="margin-left:19%;">Extended attributes are stored
d1347 1
a1347 1
<p style="margin-left:19%;">An additional <b>A</b> header
d1355 3
a1357 2
<p style="margin-left:4%; margin-top: 1em"><b>AIX
Tar</b></p>
d1359 1
a1359 3
<p style="margin-left:9%;">XXX More details needed XXX</p>

<p style="margin-left:9%; margin-top: 1em">AIX Tar uses a
d1367 12
a1378 14
<p style="margin-left:4%; margin-top: 1em"><b>Mac OS X
Tar</b></p>

<p style="margin-left:9%;">The tar distributed with
Apple&rsquo;s Mac OS X stores most regular files as two
separate files in the tar archive. The two files have the
same name except that the first one has &ldquo;._&rdquo;
prepended to the last path element. This special file stores
an AppleDouble-encoded binary blob with additional metadata
about the second file, including ACL, extended attributes,
and resources. To recreate the original file on disk, each
separate file can be extracted and the Mac OS X
<b>copyfile</b>() function can be used to unpack the
separate metadata file and apply it to th regular file.
d1384 1
a1384 1
<p style="margin-left:9%; margin-top: 1em">Note that the
d1391 6
a1396 8
<p style="margin-left:4%; margin-top: 1em"><b>Summary of
tar type codes</b></p>

<p style="margin-left:9%;">The following list is a
condensed summary of the type codes used in tar header
records generated by different tar implementations. More
details about specific implementations can be found
above:</p>
d1400 1
a1400 1
<p style="margin-left:15%; margin-top: 1em">Early tar
d1405 1
a1405 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1410 1
a1410 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1415 1
a1415 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1420 1
a1420 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1425 1
a1425 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1430 1
a1430 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1435 1
a1435 1
<p style="margin-left:15%; margin-top: 1em">POSIX standard
d1440 1
a1440 1
<p style="margin-left:15%; margin-top: 1em">POSIX
d1445 1
a1445 1
<p style="margin-left:15%; margin-top: 1em">GNU tar used
d1450 1
a1450 1
<p style="margin-left:15%; margin-top: 1em">Solaris tar ACL
d1455 1
a1455 1
<p style="margin-left:15%; margin-top: 1em">AIX tar ACL
d1460 1
a1460 1
<p style="margin-left:15%; margin-top: 1em">GNU tar
d1465 1
a1465 1
<p style="margin-left:15%; margin-top: 1em">GNU tar long
d1470 1
a1470 1
<p style="margin-left:15%; margin-top: 1em">GNU tar long
d1475 1
a1475 1
<p style="margin-left:15%; margin-top: 1em">GNU tar
d1481 1
a1481 1
<p style="margin-left:15%; margin-top: 1em">GNU tar long
d1486 1
a1486 1
<p style="margin-left:15%; margin-top: 1em">GNU tar sparse
d1491 1
a1491 1
<p style="margin-left:15%; margin-top: 1em">GNU tar
d1496 1
a1496 1
<p style="margin-left:15%; margin-top: 1em">Solaris tar
d1501 1
a1501 1
<p style="margin-left:15%; margin-top: 1em">POSIX pax
d1506 1
a1506 1
<p style="margin-left:15%; margin-top: 1em">POSIX pax
d1511 1
a1511 2
<p style="margin-left:9%;"><i>ar</i>(1), <i>pax</i>(1),
<i>tar</i>(1)</p>
d1515 1
a1515 1
<p style="margin-left:9%;">The <b>tar</b> utility is no
d1519 3
a1521 3
standards by <i>pax</i>(1). The ustar format is currently
part of the specification for the <i>pax</i>(1) utility. The
pax interchange file format is new with IEEE Std 1003.1-2001
d1526 1
a1526 1
<p style="margin-left:9%;">A <b>tar</b> command appeared in
d1538 1
a1538 1
<p style="margin-left:9%; margin-top: 1em">This
d1541 4
a1544 2
&lt;kientzle@@FreeBSD.org&gt;. Debian December 27, 2016
<i>TAR</i>(5)</p>
@


1.1.1.15
log
@libarchive: imported version 3.7.9
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
@


1.1.1.16
log
@libarchive: import version 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @@-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems
@
text
@d2 1
a2 1
<!-- CreationDate: Tue May 20 09:02:20 2025 -->
@


1.1.1.17
log
@libarchive: import version 3.8.1
@
text
@d2 1
a2 1
<!-- CreationDate: Sun Jun  1 19:29:41 2025 -->
@


1.1.1.18
log
@libarchive: imported version 3.8.2
@
text
@d2 1
a2 1
<!-- CreationDate: Wed Oct 15 21:49:47 2025 -->
@


1.1.1.19
log
@libarchive: import version 3.8.3
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Nov 17 22:19:03 2025 -->
@


1.1.1.20
log
@libarchive: import 3.8.4
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Dec  1 12:42:39 2025 -->
@


1.1.1.21
log
@libarchive: import version 3.8.5
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Jan  5 10:42:45 2026 -->
@


1.1.1.22
log
@libarchive: imported version 3.8.6
@
text
@d2 1
a2 1
<!-- CreationDate: Tue Mar 10 09:57:30 2026 -->
@


1.1.1.23
log
@libarchive: imported version 3.8.7
@
text
@d2 1
a2 1
<!-- CreationDate: Mon Apr 13 12:57:35 2026 -->
@


