STAR(4L) Schily's USER COMMANDS STAR(4L)
NAME
star - tape archive file format
DESCRIPTION
Tar Archives are layered archives. The basic structure is defined by the POSIX.1-1988 archive format and documented in the BASIC TAR
HEADER DESCRIPTION section below. The higher level structure is defined by the POSIX.1-2001 extended headers and documented in the
EXTENDED TAR (PAX) HEADER STRUCTURE section below. POSIX.1-2001 extended headers are pseudo files that contain an unlimited number of
extended header keywords and associated values. The header keywords are documented in the EXTENDED TAR (PAX) HEADER KEYWORDS section below.
BASIC TAR HEADER DESCRIPTION
Physically, a POSIX.1-1988 tar archive consists of a series of fixed sized blocks of TBLOCK(512) characters. It contains a series of file
entries terminated by a logical end-of-archive marker, which consists of two blocks of 512 bytes of binary zeroes. Each file entry is rep-
resented by a header block that describes the file followed by one or more blocks with the content of the file. The length of each file is
rounded up to a multiple of 512 bytes.
A number of TBLOCK sizes blocks are grouped together to a tape record for physical I/O operations. Each record of n blocks is written with
a single write(2) operation. On magnetic tapes, this results in a single tape record in case the tape drive is in variable length record
mode.
The header block is defined in star.h as follows:
/*
* POSIX.1-1988 field size values and magic.
*/
#define TBLOCK 512
#define NAMSIZ 100
#define PFXSIZ 155
#define TMODLEN 8
#define TUIDLEN 8
#define TGIDLEN 8
#define TSIZLEN 12
#define TMTMLEN 12
#define TCKSLEN 8
#define TMAGIC "ustar" /* ustar magic 6 chars + '