tar header format

Patrick Guelat boxdiger at impch.UUCP
Fri Aug 12 09:29:37 AEST 1988


In article <10239 at tekecs.TEK.COM> andrew at frip.gwd.tek.com (Andrew Klossner) writes:
% []
% 	"Question:  Can someone explain how tar writes its file
% 	information header to me so I can try to reconstruct (patch)
% 	the disk for recovery?"
% 
% On my (Berkeley-derived) system, "man 5 tar" tells all this.

^^^^^^ With the online manuals installed you can get the same info with
	   man F tar !!! ( on SCO )

Ok but here it is:
---- snip ---- snip ---- snip ---- snip ---- snip ---- snip ---- snip ----

#define TBLOCK 512
#define NBLOCK 20
#define NAMSIZ 100

Each File is archived in contignous block.
The first block contains the header as described below.
All Blocks starts on 512 byte block boundaries.

Format of Block:

    union hblock {
        char dummy[TBLOCK];
        struct header {
            char name[NAMSIZ]; /* if (*name=0) is_empty();     */
            char mode[8];
            char uid[8];
            char gid[8];
            char size[12];
            char mtime[12];
            char chksum[8];
            char linkflag; /* count of links */
            char linkname[NAMSIZ]; /* name of file this file is linked to */
            char extno[4];
            char extotal[4];
            char efsize[12];
        } dbuf;
    } dblock;

	Good Luck !

-- 
\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//
// Patrick Guelat, boxdiger at impch ..!altger!impch!{boxdiger,patrick,patg} \\
\\   "LOVE DOESN'T MAKE THE WORLD GO AROUND, JUST UP AND DOWN A BIT !!!"  //
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\



More information about the Comp.unix.xenix mailing list