Open System Services System Calls Reference Manual (G06.25+, H06.03+)
Files tar(4)
NAME
tar - Describes the extended tar archive file 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 file consists of a series of blocks. Each block is a fixed size of 512
bytes.
Each file within the archive is represented by a header block and zero or more data blocks that
contain the contents of the file. The header block describes the file. There are two blocks filled
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 flag 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 undefined data.
The header block is structured as shown in the following table. All lengths and offsets are in
decimal.
Table 11−9. 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
typeflag 156 1
linkname 157 100
magic 257 6
version 263 2
uname 265 32
gname 297 32
devmajor 329 8
devminor 337 8
prefix 345 155
527186-003 Hewlett-Packard Company 11−35