MPE/iX Shell and Utilities Reference Manual, Vol 2
tar(2) MPE/iX Shell and Utilities tar(2)
NAME
tar — format of tar archives
DESCRIPTION
This document describes the format of archives read and written by the tar(1) utility. The
tar utility of MPE/iX
Shell and Utilities actually supports both the older UNIX-compatible TAR
formats, and the new USTAR format defined by the
POSIX (IEEE P1003.1) standards group. The
new USTAR format allows more information to be stored, and supports longer file path names.
A tar archive, in either format, consists of one or more blocks, which are used to represent
member files. Each block is 512 bytes long; the –b option to tar can be used to indicate how
many of these blocks are read and/or written at once.
Each member file consists of a header block (as described later in this page) followed by 0 or
more blocks containing the file contents. The end of the archive is indicated by two blocks
filled with binary zeros. Unused space in the header is left as binary zeros.
The header information in a block is stored in a printable ASCII form, so that tar archives are
easily ported to different environments. If the contents of the files on the archive are all
ASCII,
the entire archive is ASCII.
Table 2-3 shows the format of the header block for a file, in the older
UNIX-compatible TAR
format.
Field Width Field Name Meaning
100 name name of file
8 mode file mode
8 uid owner user ID
8 gid owner group ID
12 size length of file in bytes
12 mtime modify time of file
8 chksum checksum for header
1 link indicator for links
100 linkname name of linked file
Table 2-3: tar Header Block (TAR Format)
The link field is 1 for a linked file, 2 for a symbolic link, and 0 otherwise. A directory is indi-
cated by a trailing slash (/) in its name.
2-8 File Formats