MPE/iX Shell and Utilities Reference Manual, Vol 2
tar(2) MPE/iX Shell and Utilities tar(2)
For the new USTAR format, headers take on the format shown in Table 2-4. Note that tar can
determine that the USTAR format is being used by the presence of the null-terminated string
"ustar" in the magic field. All fields before the magic field correspond to those of the older
format described earlier, except that the typeflag replaces the link field.
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 typeflag type of file
100 linkname name of linked file
6 magic
USTAR indicator
2 version USTAR version
32 uname owner user name
32 gname owner group name
8 devmajor device major number
8 devminor device minor number
155 prefix prefix for file name
Table 2-4: tar Header Block (USTAR Format)
This information is compatible with that returned by the
UNIX stat() function. The magic,
uname, and gname fields are null-terminated character strings. The fields name, linkname, and
prefix are null-terminated unless the full field is used to store a name (that is, the last character
is not null). All other fields are zero-filled octal numbers, in
ASCII. Trailing nulls are present
for these numbers, except for the size, mtime, and version fields.
The name field contains the name of the archived file. On USTAR format archives, the value of
the prefix field, if non-null, is prefixed to the name field to allow names longer then 100 char-
acters. For compatibility with older tar commands, MPE/iX tar leaves prefix null unless the
file name exceeds 100 characters.
The size field is 0 if the header describes a link.
The chksum field is a checksum of all the bytes in the header, assuming that the chksum field
itself is all blanks.
For USTAR, the typeflag field is a compatible extension of the link field of the older TAR format.
Table 2-5 shows the values that are recognized.
File Formats 2-9