Xref: utzoo comp.unix.wizards:10444 comp.unix.xenix:2987 Path: utzoo!utgpu!attcan!uunet!mcvax!cernvax!impch!boxdiger From: boxdiger@impch.UUCP (Patrick Guelat) Newsgroups: comp.unix.wizards,comp.unix.xenix Subject: Re: tar header format Message-ID: <271@impch.UUCP> Date: 11 Aug 88 23:29:37 GMT References: <5079@ozdaltx.UUCP> <10239@tekecs.TEK.COM> Reply-To: boxdiger@impch.UUCP (Patrick Guelat) Organization: ImproWare DataSystems Switzerland Lines: 49 In article <10239@tekecs.TEK.COM> andrew@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@impch ..!altger!impch!{boxdiger,patrick,patg} \\ \\ "LOVE DOESN'T MAKE THE WORLD GO AROUND, JUST UP AND DOWN A BIT !!!" // //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\