[comp.unix.xenix] tar header format

root@ozdaltx.UUCP (root) (08/04/88)

I have a tar saved disk that somehow has had the file header
information either removed or erased.  The data (ASCII) looks
intact, however.

Question:  Can someone explain how tar writes its file
information header to me so I can try to reconstruct (patch)
the disk for recovery?  Is there such a thing as tar.h?
 Thanks in advance...
-- 
 Scotty
 AIDS INFORMATION EXCHANGE BBS      (214) 247-2367/247-5609
                  "Education is the best weapon"
{ames,mit-eddie,rutgers,osu-cis,lll-winken,texsun,smu}!killer!ozdaltx!sysop 

andrew@frip.gwd.tek.com (Andrew Klossner) (08/09/88)

[]

	"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.

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com@relay.cs.net)   [ARPA]

boxdiger@impch.UUCP (Patrick Guelat) (08/12/88)

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 !!!"  //
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\

cck@deneb.ucdavis.edu (Earl H. Kinmonth) (08/14/88)

In article <18511@neabbs.UUCP> richard@neabbs.UUCP (RICHARD RONTELTAP) writes:
>[ type man F tar for tar header information ]
> 
>Where, How and When?
> 
>Do I get the manual pages on SCO XENIX (man(C))? Wading through the
>books is getting on my nerves.
> 
>Richard
>(mcvax!neabbs!richard)

I don't know what version of SCO Xenix you have.  Mine has a
volume, "User's Reference" (C) (M) (F).  There is a tab for the
(F) section that says "File Formats."  There is an index for this
section that says "TAR (F)."  Looking at this section gives the
TAR header.

My version of SCO Xenix also has a permuted index.  This should
give you the same search path that I've given.

richard@neabbs.UUCP (RICHARD RONTELTAP) (08/15/88)

[ Manual pages ON DISK ]
 
I wasn't very clear, sorry.
 
Q: Has anyone got the manual pages for SCO XENIX on DISK?
So I can get them on SCREEN with the MAN(C) command?
 
How much MB is it? Does SCO sell them?
 
Richard

john@jetson.UPMA.MD.US (John Owens) (08/16/88)

In article <18511@neabbs.UUCP>, richard@neabbs.UUCP (RICHARD RONTELTAP) writes:
> Do I get the manual pages on SCO XENIX (man(C))? Wading through the
> books is getting on my nerves.

The on-line manual pages come as part of the text processing system
distribution.
-- 
John Owens		john@jetson.UPMA.MD.US
SMART HOUSE L.P.	uunet!jetson!john		(old uucp)
+1 301 249 6000		john%jetson.uucp@uunet.uu.net	(old internet)