Open System Services System Calls Reference Manual (G06.25+, H06.03+)

Files tar(4)
NAME
tar - Describes the extended tar archive le format
SYNOPSIS
#include <tar.h>
DESCRIPTION
tar archives are created by the tar command. These archives are standardized and suitable for
porting between different systems.
An extended tar archive or le consists of a series of blocks. Each block is a xed size of 512
bytes.
Each le within the archive is represented by a header block and zero or more data blocks that
contain the contents of the le. The header block describes the le. There are two blocks lled
with binary zeros at the end of the archive as the end-of-archive indicator.
The data blocks are grouped for physical I/O. Each group of blocks is written with a single
write() operation. On magnetic tape, the result of this write is a single tape record.
The number of blocks in a group is set by the -b ag of the tar command; the default value is 20
blocks. The last group is always written at the full size, so blocks following the two zero blocks
contain undened data.
The header block is structured as shown in the following table. All lengths and offsets are in
decimal.
Table 119. tar Archive File Header Block
Field Name Byte Offset Length
________________________________
name 0
mode 100 8
uid 108 8
gid 116 8
size 124 12
mtime 136 12
chksum 148 8
typeag 156 1
linkname 157 100
magic 257 6
version 263 2
uname 265 32
gname 297 32
devmajor 329 8
devminor 337 8
prex 345 155
527186-003 Hewlett-Packard Company 1135