DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

tar(F)


tar -- archive format

Format

#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];
		char cpressed;
	} dbuf;
} dblock;

Description

The command tar dumps files to, and extracts files from, backup media or the hard disk.

Each file is archived in contiguous blocks. The first block is occupied by a header (see the ``Format'' section); subsequent blocks are occupied by the file data.

All headers and file data start on 512-byte block boundaries and any extra unused space is padded with garbage.

The name member is the pathname of the file when archived. If the pathname starts with a zero word, the entry is empty. It is a maximum of 100 bytes long and ends in a null byte.

The mode, uid, gid, size, and mtime members contain the same information as the corresponding members in the i-node structure (see filesystem(FP)).

The checksum member chksum 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; linkflag is set to 0 if there are no links, or 1 if there are links. No data is put in the archive file.

The cpressed member indicates that the file was compressed before it was archived. If set, the file will be piped through uncompress during extraction from the archive by tar.

See also

filesystem(FP), tar(C), uncompress(C)

Standards conformance

tar is conformant with AT&T SVID Issue 2.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005