TAR(F) UNIX System V
Name
tar - archive format
Description
The command tar(C) dumps files to and extracts files from
backup media or the hard disk.
Each file is archived in contiguous blocks, the first block
being occupied by a header, whose format is given below, and
the subsequent blocks of the files occupying the following
blocks. All headers and file data start on 512 byte block
boundaries and any spare unused space is padded with
garbage. The format of a header block is as follows:
#define TBLOCK 512
#define NBLOCK 20
#define NAMSIZ 100
union hblock {
char dummy[TBLOCK];
struct header {
char name[NAMSIZ];
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char linkflag;
char linkname[NAMSIZ];
char extno[4];
char extotal[4];
char efsize[12];
} dbuf;
} dblock;
The name entry is the path name of the file when archived.
If the pathname starts with a zero word, the entry is empty.
It is at most 100 bytes long and ends in a null byte. Mode,
uid, gid, size, and time modified are the same as described
under i-nodes (refer to filesystem(F)). The checksum entry
has a value such that the sum of the words of the directory
entry is zero.
If the entry corresponds to a link, then linkname contains
the pathname of the file to which this entry is linked and
linkflag is set to 0 if there are no links, or 1 if there
are links. No data is put in the archive file.
See Also
filesystem(F), tar(C)
Standards Conformance
tar is conformant with:
AT&T SVID Issue 2, Select Code 307-127.
(printed 8/23/89) TAR(F)