Blame libarchive/tar.5

Packit 08bd4c
.\" Copyright (c) 2003-2009 Tim Kientzle
Packit 08bd4c
.\" Copyright (c) 2016 Martin Matuska
Packit 08bd4c
.\" All rights reserved.
Packit 08bd4c
.\"
Packit 08bd4c
.\" Redistribution and use in source and binary forms, with or without
Packit 08bd4c
.\" modification, are permitted provided that the following conditions
Packit 08bd4c
.\" are met:
Packit 08bd4c
.\" 1. Redistributions of source code must retain the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer.
Packit 08bd4c
.\" 2. Redistributions in binary form must reproduce the above copyright
Packit 08bd4c
.\"    notice, this list of conditions and the following disclaimer in the
Packit 08bd4c
.\"    documentation and/or other materials provided with the distribution.
Packit 08bd4c
.\"
Packit 08bd4c
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
Packit 08bd4c
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 08bd4c
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 08bd4c
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
Packit 08bd4c
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 08bd4c
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 08bd4c
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 08bd4c
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 08bd4c
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 08bd4c
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 08bd4c
.\" SUCH DAMAGE.
Packit 08bd4c
.\"
Packit 08bd4c
.\" $FreeBSD$
Packit 08bd4c
.\"
Packit 08bd4c
.Dd December 27, 2016
Packit 08bd4c
.Dt TAR 5
Packit 08bd4c
.Os
Packit 08bd4c
.Sh NAME
Packit 08bd4c
.Nm tar
Packit 08bd4c
.Nd format of tape archive files
Packit 08bd4c
.Sh DESCRIPTION
Packit 08bd4c
The
Packit 08bd4c
.Nm
Packit 08bd4c
archive format collects any number of files, directories, and other
Packit 08bd4c
file system objects (symbolic links, device nodes, etc.) into a single
Packit 08bd4c
stream of bytes.
Packit 08bd4c
The format was originally designed to be used with
Packit 08bd4c
tape drives that operate with fixed-size blocks, but is widely used as
Packit 08bd4c
a general packaging mechanism.
Packit 08bd4c
.Ss General Format
Packit 08bd4c
A
Packit 08bd4c
.Nm
Packit 08bd4c
archive consists of a series of 512-byte records.
Packit 08bd4c
Each file system object requires a header record which stores basic metadata
Packit 08bd4c
(pathname, owner, permissions, etc.) and zero or more records containing any
Packit 08bd4c
file data.
Packit 08bd4c
The end of the archive is indicated by two records consisting
Packit 08bd4c
entirely of zero bytes.
Packit 08bd4c
.Pp
Packit 08bd4c
For compatibility with tape drives that use fixed block sizes,
Packit 08bd4c
programs that read or write tar files always read or write a fixed
Packit 08bd4c
number of records with each I/O operation.
Packit 08bd4c
These
Packit 08bd4c
.Dq blocks
Packit 08bd4c
are always a multiple of the record size.
Packit 08bd4c
The maximum block size supported by early
Packit 08bd4c
implementations was 10240 bytes or 20 records.
Packit 08bd4c
This is still the default for most implementations
Packit 08bd4c
although block sizes of 1MiB (2048 records) or larger are
Packit 08bd4c
commonly used with modern high-speed tape drives.
Packit 08bd4c
(Note: the terms
Packit 08bd4c
.Dq block
Packit 08bd4c
and
Packit 08bd4c
.Dq record
Packit 08bd4c
here are not entirely standard; this document follows the
Packit 08bd4c
convention established by John Gilmore in documenting
Packit 08bd4c
.Nm pdtar . )
Packit 08bd4c
.Ss Old-Style Archive Format
Packit 08bd4c
The original tar archive format has been extended many times to
Packit 08bd4c
include additional information that various implementors found
Packit 08bd4c
necessary.
Packit 08bd4c
This section describes the variant implemented by the tar command
Packit 08bd4c
included in
Packit 08bd4c
.At v7 ,
Packit 08bd4c
which seems to be the earliest widely-used version of the tar program.
Packit 08bd4c
.Pp
Packit 08bd4c
The header record for an old-style
Packit 08bd4c
.Nm
Packit 08bd4c
archive consists of the following:
Packit 08bd4c
.Bd -literal -offset indent
Packit 08bd4c
struct header_old_tar {
Packit 08bd4c
	char name[100];
Packit 08bd4c
	char mode[8];
Packit 08bd4c
	char uid[8];
Packit 08bd4c
	char gid[8];
Packit 08bd4c
	char size[12];
Packit 08bd4c
	char mtime[12];
Packit 08bd4c
	char checksum[8];
Packit 08bd4c
	char linkflag[1];
Packit 08bd4c
	char linkname[100];
Packit 08bd4c
	char pad[255];
Packit 08bd4c
};
Packit 08bd4c
.Ed
Packit 08bd4c
All unused bytes in the header record are filled with nulls.
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Va name
Packit 08bd4c
Pathname, stored as a null-terminated string.
Packit 08bd4c
Early tar implementations only stored regular files (including
Packit 08bd4c
hardlinks to those files).
Packit 08bd4c
One common early convention used a trailing "/" character to indicate
Packit 08bd4c
a directory name, allowing directory permissions and owner information
Packit 08bd4c
to be archived and restored.
Packit 08bd4c
.It Va mode
Packit 08bd4c
File mode, stored as an octal number in ASCII.
Packit 08bd4c
.It Va uid , Va gid
Packit 08bd4c
User id and group id of owner, as octal numbers in ASCII.
Packit 08bd4c
.It Va size
Packit 08bd4c
Size of file, as octal number in ASCII.
Packit 08bd4c
For regular files only, this indicates the amount of data
Packit 08bd4c
that follows the header.
Packit 08bd4c
In particular, this field was ignored by early tar implementations
Packit 08bd4c
when extracting hardlinks.
Packit 08bd4c
Modern writers should always store a zero length for hardlink entries.
Packit 08bd4c
.It Va mtime
Packit 08bd4c
Modification time of file, as an octal number in ASCII.
Packit 08bd4c
This indicates the number of seconds since the start of the epoch,
Packit 08bd4c
00:00:00 UTC January 1, 1970.
Packit 08bd4c
Note that negative values should be avoided
Packit 08bd4c
here, as they are handled inconsistently.
Packit 08bd4c
.It Va checksum
Packit 08bd4c
Header checksum, stored as an octal number in ASCII.
Packit 08bd4c
To compute the checksum, set the checksum field to all spaces,
Packit 08bd4c
then sum all bytes in the header using unsigned arithmetic.
Packit 08bd4c
This field should be stored as six octal digits followed by a null and a space
Packit 08bd4c
character.
Packit 08bd4c
Note that many early implementations of tar used signed arithmetic
Packit 08bd4c
for the checksum field, which can cause interoperability problems
Packit 08bd4c
when transferring archives between systems.
Packit 08bd4c
Modern robust readers compute the checksum both ways and accept the
Packit 08bd4c
header if either computation matches.
Packit 08bd4c
.It Va linkflag , Va linkname
Packit 08bd4c
In order to preserve hardlinks and conserve tape, a file
Packit 08bd4c
with multiple links is only written to the archive the first
Packit 08bd4c
time it is encountered.
Packit 08bd4c
The next time it is encountered, the
Packit 08bd4c
.Va linkflag
Packit 08bd4c
is set to an ASCII
Packit 08bd4c
.Sq 1
Packit 08bd4c
and the
Packit 08bd4c
.Va linkname
Packit 08bd4c
field holds the first name under which this file appears.
Packit 08bd4c
(Note that regular files have a null value in the
Packit 08bd4c
.Va linkflag
Packit 08bd4c
field.)
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
Early tar implementations varied in how they terminated these fields.
Packit 08bd4c
The tar command in
Packit 08bd4c
.At v7
Packit 08bd4c
used the following conventions (this is also documented in early BSD manpages):
Packit 08bd4c
the pathname must be null-terminated;
Packit 08bd4c
the mode, uid, and gid fields must end in a space and a null byte;
Packit 08bd4c
the size and mtime fields must end in a space;
Packit 08bd4c
the checksum is terminated by a null and a space.
Packit 08bd4c
Early implementations filled the numeric fields with leading spaces.
Packit 08bd4c
This seems to have been common practice until the
Packit 08bd4c
.St -p1003.1-88
Packit 08bd4c
standard was released.
Packit 08bd4c
For best portability, modern implementations should fill the numeric
Packit 08bd4c
fields with leading zeros.
Packit 08bd4c
.Ss Pre-POSIX Archives
Packit 08bd4c
An early draft of
Packit 08bd4c
.St -p1003.1-88
Packit 08bd4c
served as the basis for John Gilmore's
Packit 08bd4c
.Nm pdtar
Packit 08bd4c
program and many system implementations from the late 1980s
Packit 08bd4c
and early 1990s.
Packit 08bd4c
These archives generally follow the POSIX ustar
Packit 08bd4c
format described below with the following variations:
Packit 08bd4c
.Bl -bullet -compact -width indent
Packit 08bd4c
.It
Packit 08bd4c
The magic value consists of the five characters
Packit 08bd4c
.Dq ustar
Packit 08bd4c
followed by a space.
Packit 08bd4c
The version field contains a space character followed by a null.
Packit 08bd4c
.It
Packit 08bd4c
The numeric fields are generally filled with leading spaces
Packit 08bd4c
(not leading zeros as recommended in the final standard).
Packit 08bd4c
.It
Packit 08bd4c
The prefix field is often not used, limiting pathnames to
Packit 08bd4c
the 100 characters of old-style archives.
Packit 08bd4c
.El
Packit 08bd4c
.Ss POSIX ustar Archives
Packit 08bd4c
.St -p1003.1-88
Packit 08bd4c
defined a standard tar file format to be read and written
Packit 08bd4c
by compliant implementations of
Packit 08bd4c
.Xr tar 1 .
Packit 08bd4c
This format is often called the
Packit 08bd4c
.Dq ustar
Packit 08bd4c
format, after the magic value used
Packit 08bd4c
in the header.
Packit 08bd4c
(The name is an acronym for
Packit 08bd4c
.Dq Unix Standard TAR . )
Packit 08bd4c
It extends the historic format with new fields:
Packit 08bd4c
.Bd -literal -offset indent
Packit 08bd4c
struct header_posix_ustar {
Packit 08bd4c
	char name[100];
Packit 08bd4c
	char mode[8];
Packit 08bd4c
	char uid[8];
Packit 08bd4c
	char gid[8];
Packit 08bd4c
	char size[12];
Packit 08bd4c
	char mtime[12];
Packit 08bd4c
	char checksum[8];
Packit 08bd4c
	char typeflag[1];
Packit 08bd4c
	char linkname[100];
Packit 08bd4c
	char magic[6];
Packit 08bd4c
	char version[2];
Packit 08bd4c
	char uname[32];
Packit 08bd4c
	char gname[32];
Packit 08bd4c
	char devmajor[8];
Packit 08bd4c
	char devminor[8];
Packit 08bd4c
	char prefix[155];
Packit 08bd4c
	char pad[12];
Packit 08bd4c
};
Packit 08bd4c
.Ed
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Va typeflag
Packit 08bd4c
Type of entry.
Packit 08bd4c
POSIX extended the earlier
Packit 08bd4c
.Va linkflag
Packit 08bd4c
field with several new type values:
Packit 08bd4c
.Bl -tag -width indent -compact
Packit 08bd4c
.It Dq 0
Packit 08bd4c
Regular file.
Packit 08bd4c
NUL should be treated as a synonym, for compatibility purposes.
Packit 08bd4c
.It Dq 1
Packit 08bd4c
Hard link.
Packit 08bd4c
.It Dq 2
Packit 08bd4c
Symbolic link.
Packit 08bd4c
.It Dq 3
Packit 08bd4c
Character device node.
Packit 08bd4c
.It Dq 4
Packit 08bd4c
Block device node.
Packit 08bd4c
.It Dq 5
Packit 08bd4c
Directory.
Packit 08bd4c
.It Dq 6
Packit 08bd4c
FIFO node.
Packit 08bd4c
.It Dq 7
Packit 08bd4c
Reserved.
Packit 08bd4c
.It Other
Packit 08bd4c
A POSIX-compliant implementation must treat any unrecognized typeflag value
Packit 08bd4c
as a regular file.
Packit 08bd4c
In particular, writers should ensure that all entries
Packit 08bd4c
have a valid filename so that they can be restored by readers that do not
Packit 08bd4c
support the corresponding extension.
Packit 08bd4c
Uppercase letters "A" through "Z" are reserved for custom extensions.
Packit 08bd4c
Note that sockets and whiteout entries are not archivable.
Packit 08bd4c
.El
Packit 08bd4c
It is worth noting that the
Packit 08bd4c
.Va size
Packit 08bd4c
field, in particular, has different meanings depending on the type.
Packit 08bd4c
For regular files, of course, it indicates the amount of data
Packit 08bd4c
following the header.
Packit 08bd4c
For directories, it may be used to indicate the total size of all
Packit 08bd4c
files in the directory, for use by operating systems that pre-allocate
Packit 08bd4c
directory space.
Packit 08bd4c
For all other types, it should be set to zero by writers and ignored
Packit 08bd4c
by readers.
Packit 08bd4c
.It Va magic
Packit 08bd4c
Contains the magic value
Packit 08bd4c
.Dq ustar
Packit 08bd4c
followed by a NUL byte to indicate that this is a POSIX standard archive.
Packit 08bd4c
Full compliance requires the uname and gname fields be properly set.
Packit 08bd4c
.It Va version
Packit 08bd4c
Version.
Packit 08bd4c
This should be
Packit 08bd4c
.Dq 00
Packit 08bd4c
(two copies of the ASCII digit zero) for POSIX standard archives.
Packit 08bd4c
.It Va uname , Va gname
Packit 08bd4c
User and group names, as null-terminated ASCII strings.
Packit 08bd4c
These should be used in preference to the uid/gid values
Packit 08bd4c
when they are set and the corresponding names exist on
Packit 08bd4c
the system.
Packit 08bd4c
.It Va devmajor , Va devminor
Packit 08bd4c
Major and minor numbers for character device or block device entry.
Packit 08bd4c
.It Va name , Va prefix
Packit 08bd4c
If the pathname is too long to fit in the 100 bytes provided by the standard
Packit 08bd4c
format, it can be split at any
Packit 08bd4c
.Pa /
Packit 08bd4c
character with the first portion going into the prefix field.
Packit 08bd4c
If the prefix field is not empty, the reader will prepend
Packit 08bd4c
the prefix value and a
Packit 08bd4c
.Pa /
Packit 08bd4c
character to the regular name field to obtain the full pathname.
Packit 08bd4c
The standard does not require a trailing
Packit 08bd4c
.Pa /
Packit 08bd4c
character on directory names, though most implementations still
Packit 08bd4c
include this for compatibility reasons.
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
Note that all unused bytes must be set to
Packit 08bd4c
.Dv NUL .
Packit 08bd4c
.Pp
Packit 08bd4c
Field termination is specified slightly differently by POSIX
Packit 08bd4c
than by previous implementations.
Packit 08bd4c
The
Packit 08bd4c
.Va magic ,
Packit 08bd4c
.Va uname ,
Packit 08bd4c
and
Packit 08bd4c
.Va gname
Packit 08bd4c
fields must have a trailing
Packit 08bd4c
.Dv NUL .
Packit 08bd4c
The
Packit 08bd4c
.Va pathname ,
Packit 08bd4c
.Va linkname ,
Packit 08bd4c
and
Packit 08bd4c
.Va prefix
Packit 08bd4c
fields must have a trailing
Packit 08bd4c
.Dv NUL
Packit 08bd4c
unless they fill the entire field.
Packit 08bd4c
(In particular, it is possible to store a 256-character pathname if it
Packit 08bd4c
happens to have a
Packit 08bd4c
.Pa /
Packit 08bd4c
as the 156th character.)
Packit 08bd4c
POSIX requires numeric fields to be zero-padded in the front, and requires
Packit 08bd4c
them to be terminated with either space or
Packit 08bd4c
.Dv NUL
Packit 08bd4c
characters.
Packit 08bd4c
.Pp
Packit 08bd4c
Currently, most tar implementations comply with the ustar
Packit 08bd4c
format, occasionally extending it by adding new fields to the
Packit 08bd4c
blank area at the end of the header record.
Packit 08bd4c
.Ss Numeric Extensions
Packit 08bd4c
There have been several attempts to extend the range of sizes
Packit 08bd4c
or times supported by modifying how numbers are stored in the
Packit 08bd4c
header.
Packit 08bd4c
.Pp
Packit 08bd4c
One obvious extension to increase the size of files is to
Packit 08bd4c
eliminate the terminating characters from the various
Packit 08bd4c
numeric fields.
Packit 08bd4c
For example, the standard only allows the size field to contain
Packit 08bd4c
11 octal digits, reserving the twelfth byte for a trailing
Packit 08bd4c
NUL character.
Packit 08bd4c
Allowing 12 octal digits allows file sizes up to 64 GB.
Packit 08bd4c
.Pp
Packit 08bd4c
Another extension, utilized by GNU tar, star, and other newer
Packit 08bd4c
.Nm
Packit 08bd4c
implementations, permits binary numbers in the standard numeric fields.
Packit 08bd4c
This is flagged by setting the high bit of the first byte.
Packit 08bd4c
The remainder of the field is treated as a signed twos-complement
Packit 08bd4c
value.
Packit 08bd4c
This permits 95-bit values for the length and time fields
Packit 08bd4c
and 63-bit values for the uid, gid, and device numbers.
Packit 08bd4c
In particular, this provides a consistent way to handle
Packit 08bd4c
negative time values.
Packit 08bd4c
GNU tar supports this extension for the
Packit 08bd4c
length, mtime, ctime, and atime fields.
Packit 08bd4c
Joerg Schilling's star program and the libarchive library support
Packit 08bd4c
this extension for all numeric fields.
Packit 08bd4c
Note that this extension is largely obsoleted by the extended
Packit 08bd4c
attribute record provided by the pax interchange format.
Packit 08bd4c
.Pp
Packit 08bd4c
Another early GNU extension allowed base-64 values rather than octal.
Packit 08bd4c
This extension was short-lived and is no longer supported by any
Packit 08bd4c
implementation.
Packit 08bd4c
.Ss Pax Interchange Format
Packit 08bd4c
There are many attributes that cannot be portably stored in a
Packit 08bd4c
POSIX ustar archive.
Packit 08bd4c
.St -p1003.1-2001
Packit 08bd4c
defined a
Packit 08bd4c
.Dq pax interchange format
Packit 08bd4c
that uses two new types of entries to hold text-formatted
Packit 08bd4c
metadata that applies to following entries.
Packit 08bd4c
Note that a pax interchange format archive is a ustar archive in every
Packit 08bd4c
respect.
Packit 08bd4c
The new data is stored in ustar-compatible archive entries that use the
Packit 08bd4c
.Dq x
Packit 08bd4c
or
Packit 08bd4c
.Dq g
Packit 08bd4c
typeflag.
Packit 08bd4c
In particular, older implementations that do not fully support these
Packit 08bd4c
extensions will extract the metadata into regular files, where the
Packit 08bd4c
metadata can be examined as necessary.
Packit 08bd4c
.Pp
Packit 08bd4c
An entry in a pax interchange format archive consists of one or
Packit 08bd4c
two standard ustar entries, each with its own header and data.
Packit 08bd4c
The first optional entry stores the extended attributes
Packit 08bd4c
for the following entry.
Packit 08bd4c
This optional first entry has an "x" typeflag and a size field that
Packit 08bd4c
indicates the total size of the extended attributes.
Packit 08bd4c
The extended attributes themselves are stored as a series of text-format
Packit 08bd4c
lines encoded in the portable UTF-8 encoding.
Packit 08bd4c
Each line consists of a decimal number, a space, a key string, an equals
Packit 08bd4c
sign, a value string, and a new line.
Packit 08bd4c
The decimal number indicates the length of the entire line, including the
Packit 08bd4c
initial length field and the trailing newline.
Packit 08bd4c
An example of such a field is:
Packit 08bd4c
.Dl 25 ctime=1084839148.1212\en
Packit 08bd4c
Keys in all lowercase are standard keys.
Packit 08bd4c
Vendors can add their own keys by prefixing them with an all uppercase
Packit 08bd4c
vendor name and a period.
Packit 08bd4c
Note that, unlike the historic header, numeric values are stored using
Packit 08bd4c
decimal, not octal.
Packit 08bd4c
A description of some common keys follows:
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Cm atime , Cm ctime , Cm mtime
Packit 08bd4c
File access, inode change, and modification times.
Packit 08bd4c
These fields can be negative or include a decimal point and a fractional value.
Packit 08bd4c
.It Cm hdrcharset
Packit 08bd4c
The character set used by the pax extension values.
Packit 08bd4c
By default, all textual values in the pax extended attributes
Packit 08bd4c
are assumed to be in UTF-8, including pathnames, user names,
Packit 08bd4c
and group names.
Packit 08bd4c
In some cases, it is not possible to translate local
Packit 08bd4c
conventions into UTF-8.
Packit 08bd4c
If this key is present and the value is the six-character ASCII string
Packit 08bd4c
.Dq BINARY ,
Packit 08bd4c
then all textual values are assumed to be in a platform-dependent
Packit 08bd4c
multi-byte encoding.
Packit 08bd4c
Note that there are only two valid values for this key:
Packit 08bd4c
.Dq BINARY
Packit 08bd4c
or
Packit 08bd4c
.Dq ISO-IR\ 10646\ 2000\ UTF-8 .
Packit 08bd4c
No other values are permitted by the standard, and
Packit 08bd4c
the latter value should generally not be used as it is the
Packit 08bd4c
default when this key is not specified.
Packit 08bd4c
In particular, this flag should not be used as a general
Packit 08bd4c
mechanism to allow filenames to be stored in arbitrary
Packit 08bd4c
encodings.
Packit 08bd4c
.It Cm uname , Cm uid , Cm gname , Cm gid
Packit 08bd4c
User name, group name, and numeric UID and GID values.
Packit 08bd4c
The user name and group name stored here are encoded in UTF8
Packit 08bd4c
and can thus include non-ASCII characters.
Packit 08bd4c
The UID and GID fields can be of arbitrary length.
Packit 08bd4c
.It Cm linkpath
Packit 08bd4c
The full path of the linked-to file.
Packit 08bd4c
Note that this is encoded in UTF8 and can thus include non-ASCII characters.
Packit 08bd4c
.It Cm path
Packit 08bd4c
The full pathname of the entry.
Packit 08bd4c
Note that this is encoded in UTF8 and can thus include non-ASCII characters.
Packit 08bd4c
.It Cm realtime.* , Cm security.*
Packit 08bd4c
These keys are reserved and may be used for future standardization.
Packit 08bd4c
.It Cm size
Packit 08bd4c
The size of the file.
Packit 08bd4c
Note that there is no length limit on this field, allowing conforming
Packit 08bd4c
archives to store files much larger than the historic 8GB limit.
Packit 08bd4c
.It Cm SCHILY.*
Packit 08bd4c
Vendor-specific attributes used by Joerg Schilling's
Packit 08bd4c
.Nm star
Packit 08bd4c
implementation.
Packit 08bd4c
.It Cm SCHILY.acl.access , Cm SCHILY.acl.default, Cm SCHILY.acl.ace
Packit 08bd4c
Stores the access, default and NFSv4 ACLs as textual strings in a format
Packit 08bd4c
that is an extension of the format specified by POSIX.1e draft 17.
Packit 08bd4c
In particular, each user or group access specification can include
Packit 08bd4c
an additional colon-separated field with the numeric UID or GID.
Packit 08bd4c
This allows ACLs to be restored on systems that may not have complete
Packit 08bd4c
user or group information available (such as when NIS/YP or LDAP services
Packit 08bd4c
are temporarily unavailable).
Packit 08bd4c
.It Cm SCHILY.devminor , Cm SCHILY.devmajor
Packit 08bd4c
The full minor and major numbers for device nodes.
Packit 08bd4c
.It Cm SCHILY.fflags
Packit 08bd4c
The file flags.
Packit 08bd4c
.It Cm SCHILY.realsize
Packit 08bd4c
The full size of the file on disk.
Packit 08bd4c
XXX explain? XXX
Packit 08bd4c
.It Cm SCHILY.dev, Cm SCHILY.ino , Cm SCHILY.nlinks
Packit 08bd4c
The device number, inode number, and link count for the entry.
Packit 08bd4c
In particular, note that a pax interchange format archive using Joerg
Packit 08bd4c
Schilling's
Packit 08bd4c
.Cm SCHILY.*
Packit 08bd4c
extensions can store all of the data from
Packit 08bd4c
.Va struct stat .
Packit 08bd4c
.It Cm LIBARCHIVE.*
Packit 08bd4c
Vendor-specific attributes used by the
Packit 08bd4c
.Nm libarchive
Packit 08bd4c
library and programs that use it.
Packit 08bd4c
.It Cm LIBARCHIVE.creationtime
Packit 08bd4c
The time when the file was created.
Packit 08bd4c
(This should not be confused with the POSIX
Packit 08bd4c
.Dq ctime
Packit 08bd4c
attribute, which refers to the time when the file
Packit 08bd4c
metadata was last changed.)
Packit 08bd4c
.It Cm LIBARCHIVE.xattr. Ns Ar namespace Ns . Ns Ar key
Packit 08bd4c
Libarchive stores POSIX.1e-style extended attributes using
Packit 08bd4c
keys of this form.
Packit 08bd4c
The
Packit 08bd4c
.Ar key
Packit 08bd4c
value is URL-encoded:
Packit 08bd4c
All non-ASCII characters and the two special characters
Packit 08bd4c
.Dq =
Packit 08bd4c
and
Packit 08bd4c
.Dq %
Packit 08bd4c
are encoded as
Packit 08bd4c
.Dq %
Packit 08bd4c
followed by two uppercase hexadecimal digits.
Packit 08bd4c
The value of this key is the extended attribute value
Packit 08bd4c
encoded in base 64.
Packit 08bd4c
XXX Detail the base-64 format here XXX
Packit 08bd4c
.It Cm VENDOR.*
Packit 08bd4c
XXX document other vendor-specific extensions XXX
Packit 08bd4c
.El
Packit 08bd4c
.Pp
Packit 08bd4c
Any values stored in an extended attribute override the corresponding
Packit 08bd4c
values in the regular tar header.
Packit 08bd4c
Note that compliant readers should ignore the regular fields when they
Packit 08bd4c
are overridden.
Packit 08bd4c
This is important, as existing archivers are known to store non-compliant
Packit 08bd4c
values in the standard header fields in this situation.
Packit 08bd4c
There are no limits on length for any of these fields.
Packit 08bd4c
In particular, numeric fields can be arbitrarily large.
Packit 08bd4c
All text fields are encoded in UTF8.
Packit 08bd4c
Compliant writers should store only portable 7-bit ASCII characters in
Packit 08bd4c
the standard ustar header and use extended
Packit 08bd4c
attributes whenever a text value contains non-ASCII characters.
Packit 08bd4c
.Pp
Packit 08bd4c
In addition to the
Packit 08bd4c
.Cm x
Packit 08bd4c
entry described above, the pax interchange format
Packit 08bd4c
also supports a
Packit 08bd4c
.Cm g
Packit 08bd4c
entry.
Packit 08bd4c
The
Packit 08bd4c
.Cm g
Packit 08bd4c
entry is identical in format, but specifies attributes that serve as
Packit 08bd4c
defaults for all subsequent archive entries.
Packit 08bd4c
The
Packit 08bd4c
.Cm g
Packit 08bd4c
entry is not widely used.
Packit 08bd4c
.Pp
Packit 08bd4c
Besides the new
Packit 08bd4c
.Cm x
Packit 08bd4c
and
Packit 08bd4c
.Cm g
Packit 08bd4c
entries, the pax interchange format has a few other minor variations
Packit 08bd4c
from the earlier ustar format.
Packit 08bd4c
The most troubling one is that hardlinks are permitted to have
Packit 08bd4c
data following them.
Packit 08bd4c
This allows readers to restore any hardlink to a file without
Packit 08bd4c
having to rewind the archive to find an earlier entry.
Packit 08bd4c
However, it creates complications for robust readers, as it is no longer
Packit 08bd4c
clear whether or not they should ignore the size field for hardlink entries.
Packit 08bd4c
.Ss GNU Tar Archives
Packit 08bd4c
The GNU tar program started with a pre-POSIX format similar to that
Packit 08bd4c
described earlier and has extended it using several different mechanisms:
Packit 08bd4c
It added new fields to the empty space in the header (some of which was later
Packit 08bd4c
used by POSIX for conflicting purposes);
Packit 08bd4c
it allowed the header to be continued over multiple records;
Packit 08bd4c
and it defined new entries that modify following entries
Packit 08bd4c
(similar in principle to the
Packit 08bd4c
.Cm x
Packit 08bd4c
entry described above, but each GNU special entry is single-purpose,
Packit 08bd4c
unlike the general-purpose
Packit 08bd4c
.Cm x
Packit 08bd4c
entry).
Packit 08bd4c
As a result, GNU tar archives are not POSIX compatible, although
Packit 08bd4c
more lenient POSIX-compliant readers can successfully extract most
Packit 08bd4c
GNU tar archives.
Packit 08bd4c
.Bd -literal -offset indent
Packit 08bd4c
struct header_gnu_tar {
Packit 08bd4c
	char name[100];
Packit 08bd4c
	char mode[8];
Packit 08bd4c
	char uid[8];
Packit 08bd4c
	char gid[8];
Packit 08bd4c
	char size[12];
Packit 08bd4c
	char mtime[12];
Packit 08bd4c
	char checksum[8];
Packit 08bd4c
	char typeflag[1];
Packit 08bd4c
	char linkname[100];
Packit 08bd4c
	char magic[6];
Packit 08bd4c
	char version[2];
Packit 08bd4c
	char uname[32];
Packit 08bd4c
	char gname[32];
Packit 08bd4c
	char devmajor[8];
Packit 08bd4c
	char devminor[8];
Packit 08bd4c
	char atime[12];
Packit 08bd4c
	char ctime[12];
Packit 08bd4c
	char offset[12];
Packit 08bd4c
	char longnames[4];
Packit 08bd4c
	char unused[1];
Packit 08bd4c
	struct {
Packit 08bd4c
		char offset[12];
Packit 08bd4c
		char numbytes[12];
Packit 08bd4c
	} sparse[4];
Packit 08bd4c
	char isextended[1];
Packit 08bd4c
	char realsize[12];
Packit 08bd4c
	char pad[17];
Packit 08bd4c
};
Packit 08bd4c
.Ed
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Va typeflag
Packit 08bd4c
GNU tar uses the following special entry types, in addition to
Packit 08bd4c
those defined by POSIX:
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It "7"
Packit 08bd4c
GNU tar treats type "7" records identically to type "0" records,
Packit 08bd4c
except on one obscure RTOS where they are used to indicate the
Packit 08bd4c
pre-allocation of a contiguous file on disk.
Packit 08bd4c
.It "D"
Packit 08bd4c
This indicates a directory entry.
Packit 08bd4c
Unlike the POSIX-standard "5"
Packit 08bd4c
typeflag, the header is followed by data records listing the names
Packit 08bd4c
of files in this directory.
Packit 08bd4c
Each name is preceded by an ASCII "Y"
Packit 08bd4c
if the file is stored in this archive or "N" if the file is not
Packit 08bd4c
stored in this archive.
Packit 08bd4c
Each name is terminated with a null, and
Packit 08bd4c
an extra null marks the end of the name list.
Packit 08bd4c
The purpose of this
Packit 08bd4c
entry is to support incremental backups; a program restoring from
Packit 08bd4c
such an archive may wish to delete files on disk that did not exist
Packit 08bd4c
in the directory when the archive was made.
Packit 08bd4c
.Pp
Packit 08bd4c
Note that the "D" typeflag specifically violates POSIX, which requires
Packit 08bd4c
that unrecognized typeflags be restored as normal files.
Packit 08bd4c
In this case, restoring the "D" entry as a file could interfere
Packit 08bd4c
with subsequent creation of the like-named directory.
Packit 08bd4c
.It "K"
Packit 08bd4c
The data for this entry is a long linkname for the following regular entry.
Packit 08bd4c
.It "L"
Packit 08bd4c
The data for this entry is a long pathname for the following regular entry.
Packit 08bd4c
.It "M"
Packit 08bd4c
This is a continuation of the last file on the previous volume.
Packit 08bd4c
GNU multi-volume archives guarantee that each volume begins with a valid
Packit 08bd4c
entry header.
Packit 08bd4c
To ensure this, a file may be split, with part stored at the end of one volume,
Packit 08bd4c
and part stored at the beginning of the next volume.
Packit 08bd4c
The "M" typeflag indicates that this entry continues an existing file.
Packit 08bd4c
Such entries can only occur as the first or second entry
Packit 08bd4c
in an archive (the latter only if the first entry is a volume label).
Packit 08bd4c
The
Packit 08bd4c
.Va size
Packit 08bd4c
field specifies the size of this entry.
Packit 08bd4c
The
Packit 08bd4c
.Va offset
Packit 08bd4c
field at bytes 369-380 specifies the offset where this file fragment
Packit 08bd4c
begins.
Packit 08bd4c
The
Packit 08bd4c
.Va realsize
Packit 08bd4c
field specifies the total size of the file (which must equal
Packit 08bd4c
.Va size
Packit 08bd4c
plus
Packit 08bd4c
.Va offset ) .
Packit 08bd4c
When extracting, GNU tar checks that the header file name is the one it is
Packit 08bd4c
expecting, that the header offset is in the correct sequence, and that
Packit 08bd4c
the sum of offset and size is equal to realsize.
Packit 08bd4c
.It "N"
Packit 08bd4c
Type "N" records are no longer generated by GNU tar.
Packit 08bd4c
They contained a
Packit 08bd4c
list of files to be renamed or symlinked after extraction; this was
Packit 08bd4c
originally used to support long names.
Packit 08bd4c
The contents of this record
Packit 08bd4c
are a text description of the operations to be done, in the form
Packit 08bd4c
.Dq Rename %s to %s\en
Packit 08bd4c
or
Packit 08bd4c
.Dq Symlink %s to %s\en ;
Packit 08bd4c
in either case, both
Packit 08bd4c
filenames are escaped using K&R C syntax.
Packit 08bd4c
Due to security concerns, "N" records are now generally ignored
Packit 08bd4c
when reading archives.
Packit 08bd4c
.It "S"
Packit 08bd4c
This is a
Packit 08bd4c
.Dq sparse
Packit 08bd4c
regular file.
Packit 08bd4c
Sparse files are stored as a series of fragments.
Packit 08bd4c
The header contains a list of fragment offset/length pairs.
Packit 08bd4c
If more than four such entries are required, the header is
Packit 08bd4c
extended as necessary with
Packit 08bd4c
.Dq extra
Packit 08bd4c
header extensions (an older format that is no longer used), or
Packit 08bd4c
.Dq sparse
Packit 08bd4c
extensions.
Packit 08bd4c
.It "V"
Packit 08bd4c
The
Packit 08bd4c
.Va name
Packit 08bd4c
field should be interpreted as a tape/volume header name.
Packit 08bd4c
This entry should generally be ignored on extraction.
Packit 08bd4c
.El
Packit 08bd4c
.It Va magic
Packit 08bd4c
The magic field holds the five characters
Packit 08bd4c
.Dq ustar
Packit 08bd4c
followed by a space.
Packit 08bd4c
Note that POSIX ustar archives have a trailing null.
Packit 08bd4c
.It Va version
Packit 08bd4c
The version field holds a space character followed by a null.
Packit 08bd4c
Note that POSIX ustar archives use two copies of the ASCII digit
Packit 08bd4c
.Dq 0 .
Packit 08bd4c
.It Va atime , Va ctime
Packit 08bd4c
The time the file was last accessed and the time of
Packit 08bd4c
last change of file information, stored in octal as with
Packit 08bd4c
.Va mtime .
Packit 08bd4c
.It Va longnames
Packit 08bd4c
This field is apparently no longer used.
Packit 08bd4c
.It Sparse Va offset / Va numbytes
Packit 08bd4c
Each such structure specifies a single fragment of a sparse
Packit 08bd4c
file.
Packit 08bd4c
The two fields store values as octal numbers.
Packit 08bd4c
The fragments are each padded to a multiple of 512 bytes
Packit 08bd4c
in the archive.
Packit 08bd4c
On extraction, the list of fragments is collected from the
Packit 08bd4c
header (including any extension headers), and the data
Packit 08bd4c
is then read and written to the file at appropriate offsets.
Packit 08bd4c
.It Va isextended
Packit 08bd4c
If this is set to non-zero, the header will be followed by additional
Packit 08bd4c
.Dq sparse header
Packit 08bd4c
records.
Packit 08bd4c
Each such record contains information about as many as 21 additional
Packit 08bd4c
sparse blocks as shown here:
Packit 08bd4c
.Bd -literal -offset indent
Packit 08bd4c
struct gnu_sparse_header {
Packit 08bd4c
	struct {
Packit 08bd4c
		char offset[12];
Packit 08bd4c
		char numbytes[12];
Packit 08bd4c
	} sparse[21];
Packit 08bd4c
	char    isextended[1];
Packit 08bd4c
	char    padding[7];
Packit 08bd4c
};
Packit 08bd4c
.Ed
Packit 08bd4c
.It Va realsize
Packit 08bd4c
A binary representation of the file's complete size, with a much larger range
Packit 08bd4c
than the POSIX file size.
Packit 08bd4c
In particular, with
Packit 08bd4c
.Cm M
Packit 08bd4c
type files, the current entry is only a portion of the file.
Packit 08bd4c
In that case, the POSIX size field will indicate the size of this
Packit 08bd4c
entry; the
Packit 08bd4c
.Va realsize
Packit 08bd4c
field will indicate the total size of the file.
Packit 08bd4c
.El
Packit 08bd4c
.Ss GNU tar pax archives
Packit 08bd4c
GNU tar 1.14 (XXX check this XXX) and later will write
Packit 08bd4c
pax interchange format archives when you specify the
Packit 08bd4c
.Fl -posix
Packit 08bd4c
flag.
Packit 08bd4c
This format follows the pax interchange format closely,
Packit 08bd4c
using some
Packit 08bd4c
.Cm SCHILY
Packit 08bd4c
tags and introducing new keywords to store sparse file information.
Packit 08bd4c
There have been three iterations of the sparse file support, referred to
Packit 08bd4c
as
Packit 08bd4c
.Dq 0.0 ,
Packit 08bd4c
.Dq 0.1 ,
Packit 08bd4c
and
Packit 08bd4c
.Dq 1.0 .
Packit 08bd4c
.Bl -tag -width indent
Packit 08bd4c
.It Cm GNU.sparse.numblocks , Cm GNU.sparse.offset , Cm GNU.sparse.numbytes , Cm  GNU.sparse.size
Packit 08bd4c
The
Packit 08bd4c
.Dq 0.0
Packit 08bd4c
format used an initial
Packit 08bd4c
.Cm GNU.sparse.numblocks
Packit 08bd4c
attribute to indicate the number of blocks in the file, a pair of
Packit 08bd4c
.Cm GNU.sparse.offset
Packit 08bd4c
and
Packit 08bd4c
.Cm GNU.sparse.numbytes
Packit 08bd4c
to indicate the offset and size of each block,
Packit 08bd4c
and a single
Packit 08bd4c
.Cm GNU.sparse.size
Packit 08bd4c
to indicate the full size of the file.
Packit 08bd4c
This is not the same as the size in the tar header because the
Packit 08bd4c
latter value does not include the size of any holes.
Packit 08bd4c
This format required that the order of attributes be preserved and
Packit 08bd4c
relied on readers accepting multiple appearances of the same attribute
Packit 08bd4c
names, which is not officially permitted by the standards.
Packit 08bd4c
.It Cm GNU.sparse.map
Packit 08bd4c
The
Packit 08bd4c
.Dq 0.1
Packit 08bd4c
format used a single attribute that stored a comma-separated
Packit 08bd4c
list of decimal numbers.
Packit 08bd4c
Each pair of numbers indicated the offset and size, respectively,
Packit 08bd4c
of a block of data.
Packit 08bd4c
This does not work well if the archive is extracted by an archiver
Packit 08bd4c
that does not recognize this extension, since many pax implementations
Packit 08bd4c
simply discard unrecognized attributes.
Packit 08bd4c
.It Cm GNU.sparse.major , Cm GNU.sparse.minor , Cm GNU.sparse.name , Cm GNU.sparse.realsize
Packit 08bd4c
The
Packit 08bd4c
.Dq 1.0
Packit 08bd4c
format stores the sparse block map in one or more 512-byte blocks
Packit 08bd4c
prepended to the file data in the entry body.
Packit 08bd4c
The pax attributes indicate the existence of this map
Packit 08bd4c
(via the
Packit 08bd4c
.Cm GNU.sparse.major
Packit 08bd4c
and
Packit 08bd4c
.Cm GNU.sparse.minor
Packit 08bd4c
fields)
Packit 08bd4c
and the full size of the file.
Packit 08bd4c
The
Packit 08bd4c
.Cm GNU.sparse.name
Packit 08bd4c
holds the true name of the file.
Packit 08bd4c
To avoid confusion, the name stored in the regular tar header
Packit 08bd4c
is a modified name so that extraction errors will be apparent
Packit 08bd4c
to users.
Packit 08bd4c
.El
Packit 08bd4c
.Ss Solaris Tar
Packit 08bd4c
XXX More Details Needed XXX
Packit 08bd4c
.Pp
Packit 08bd4c
Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an
Packit 08bd4c
.Dq extended
Packit 08bd4c
format that is fundamentally similar to pax interchange format,
Packit 08bd4c
with the following differences:
Packit 08bd4c
.Bl -bullet -compact -width indent
Packit 08bd4c
.It
Packit 08bd4c
Extended attributes are stored in an entry whose type is
Packit 08bd4c
.Cm X ,
Packit 08bd4c
not
Packit 08bd4c
.Cm x ,
Packit 08bd4c
as used by pax interchange format.
Packit 08bd4c
The detailed format of this entry appears to be the same
Packit 08bd4c
as detailed above for the
Packit 08bd4c
.Cm x
Packit 08bd4c
entry.
Packit 08bd4c
.It
Packit 08bd4c
An additional
Packit 08bd4c
.Cm A
Packit 08bd4c
header is used to store an ACL for the following regular entry.
Packit 08bd4c
The body of this entry contains a seven-digit octal number
Packit 08bd4c
followed by a zero byte, followed by the
Packit 08bd4c
textual ACL description.
Packit 08bd4c
The octal value is the number of ACL entries
Packit 08bd4c
plus a constant that indicates the ACL type: 01000000
Packit 08bd4c
for POSIX.1e ACLs and 03000000 for NFSv4 ACLs.
Packit 08bd4c
.El
Packit 08bd4c
.Ss AIX Tar
Packit 08bd4c
XXX More details needed XXX
Packit 08bd4c
.Pp
Packit 08bd4c
AIX Tar uses a ustar-formatted header with the type
Packit 08bd4c
.Cm A
Packit 08bd4c
for storing coded ACL information.
Packit 08bd4c
Unlike the Solaris format, AIX tar writes this header after the
Packit 08bd4c
regular file body to which it applies.
Packit 08bd4c
The pathname in this header is either
Packit 08bd4c
.Cm NFS4
Packit 08bd4c
or
Packit 08bd4c
.Cm AIXC
Packit 08bd4c
to indicate the type of ACL stored.
Packit 08bd4c
The actual ACL is stored in platform-specific binary format.
Packit 08bd4c
.Ss Mac OS X Tar
Packit 08bd4c
The tar distributed with Apple's Mac OS X stores most regular files
Packit 08bd4c
as two separate files in the tar archive.
Packit 08bd4c
The two files have the same name except that the first
Packit 08bd4c
one has
Packit 08bd4c
.Dq ._
Packit 08bd4c
prepended to the last path element.
Packit 08bd4c
This special file stores an AppleDouble-encoded
Packit 08bd4c
binary blob with additional metadata about the second file,
Packit 08bd4c
including ACL, extended attributes, and resources.
Packit 08bd4c
To recreate the original file on disk, each
Packit 08bd4c
separate file can be extracted and the Mac OS X
Packit 08bd4c
.Fn copyfile
Packit 08bd4c
function can be used to unpack the separate
Packit 08bd4c
metadata file and apply it to th regular file.
Packit 08bd4c
Conversely, the same function provides a
Packit 08bd4c
.Dq pack
Packit 08bd4c
option to encode the extended metadata from
Packit 08bd4c
a file into a separate file whose contents
Packit 08bd4c
can then be put into a tar archive.
Packit 08bd4c
.Pp
Packit 08bd4c
Note that the Apple extended attributes interact
Packit 08bd4c
badly with long filenames.
Packit 08bd4c
Since each file is stored with the full name,
Packit 08bd4c
a separate set of extensions needs to be included
Packit 08bd4c
in the archive for each one, doubling the overhead
Packit 08bd4c
required for files with long names.
Packit 08bd4c
.Ss Summary of tar type codes
Packit 08bd4c
The following list is a condensed summary of the type codes
Packit 08bd4c
used in tar header records generated by different tar implementations.
Packit 08bd4c
More details about specific implementations can be found above:
Packit 08bd4c
.Bl -tag -compact -width XXX
Packit 08bd4c
.It NUL
Packit 08bd4c
Early tar programs stored a zero byte for regular files.
Packit 08bd4c
.It Cm 0
Packit 08bd4c
POSIX standard type code for a regular file.
Packit 08bd4c
.It Cm 1
Packit 08bd4c
POSIX standard type code for a hard link description.
Packit 08bd4c
.It Cm 2
Packit 08bd4c
POSIX standard type code for a symbolic link description.
Packit 08bd4c
.It Cm 3
Packit 08bd4c
POSIX standard type code for a character device node.
Packit 08bd4c
.It Cm 4
Packit 08bd4c
POSIX standard type code for a block device node.
Packit 08bd4c
.It Cm 5
Packit 08bd4c
POSIX standard type code for a directory.
Packit 08bd4c
.It Cm 6
Packit 08bd4c
POSIX standard type code for a FIFO.
Packit 08bd4c
.It Cm 7
Packit 08bd4c
POSIX reserved.
Packit 08bd4c
.It Cm 7
Packit 08bd4c
GNU tar used for pre-allocated files on some systems.
Packit 08bd4c
.It Cm A
Packit 08bd4c
Solaris tar ACL description stored prior to a regular file header.
Packit 08bd4c
.It Cm A
Packit 08bd4c
AIX tar ACL description stored after the file body.
Packit 08bd4c
.It Cm D
Packit 08bd4c
GNU tar directory dump.
Packit 08bd4c
.It Cm K
Packit 08bd4c
GNU tar long linkname for the following header.
Packit 08bd4c
.It Cm L
Packit 08bd4c
GNU tar long pathname for the following header.
Packit 08bd4c
.It Cm M
Packit 08bd4c
GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume.
Packit 08bd4c
.It Cm N
Packit 08bd4c
GNU tar long filename support.  Deprecated.
Packit 08bd4c
.It Cm S
Packit 08bd4c
GNU tar sparse regular file.
Packit 08bd4c
.It Cm V
Packit 08bd4c
GNU tar tape/volume header name.
Packit 08bd4c
.It Cm X
Packit 08bd4c
Solaris tar general-purpose extension header.
Packit 08bd4c
.It Cm g
Packit 08bd4c
POSIX pax interchange format global extensions.
Packit 08bd4c
.It Cm x
Packit 08bd4c
POSIX pax interchange format per-file extensions.
Packit 08bd4c
.El
Packit 08bd4c
.Sh SEE ALSO
Packit 08bd4c
.Xr ar 1 ,
Packit 08bd4c
.Xr pax 1 ,
Packit 08bd4c
.Xr tar 1
Packit 08bd4c
.Sh STANDARDS
Packit 08bd4c
The
Packit 08bd4c
.Nm tar
Packit 08bd4c
utility is no longer a part of POSIX or the Single Unix Standard.
Packit 08bd4c
It last appeared in
Packit 08bd4c
.St -susv2 .
Packit 08bd4c
It has been supplanted in subsequent standards by
Packit 08bd4c
.Xr pax 1 .
Packit 08bd4c
The ustar format is currently part of the specification for the
Packit 08bd4c
.Xr pax 1
Packit 08bd4c
utility.
Packit 08bd4c
The pax interchange file format is new with
Packit 08bd4c
.St -p1003.1-2001 .
Packit 08bd4c
.Sh HISTORY
Packit 08bd4c
A
Packit 08bd4c
.Nm tar
Packit 08bd4c
command appeared in Seventh Edition Unix, which was released in January, 1979.
Packit 08bd4c
It replaced the
Packit 08bd4c
.Nm tp
Packit 08bd4c
program from Fourth Edition Unix which in turn replaced the
Packit 08bd4c
.Nm tap
Packit 08bd4c
program from First Edition Unix.
Packit 08bd4c
John Gilmore's
Packit 08bd4c
.Nm pdtar
Packit 08bd4c
public-domain implementation (circa 1987) was highly influential
Packit 08bd4c
and formed the basis of
Packit 08bd4c
.Nm GNU tar
Packit 08bd4c
(circa 1988).
Packit 08bd4c
Joerg Shilling's
Packit 08bd4c
.Nm star
Packit 08bd4c
archiver is another open-source (CDDL) archiver (originally developed
Packit 08bd4c
circa 1985) which features complete support for pax interchange
Packit 08bd4c
format.
Packit 08bd4c
.Pp
Packit 08bd4c
This documentation was written as part of the
Packit 08bd4c
.Nm libarchive
Packit 08bd4c
and
Packit 08bd4c
.Nm bsdtar
Packit 08bd4c
project by
Packit 08bd4c
.An Tim Kientzle Aq kientzle@FreeBSD.org .