[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: finding a tarball on a fat-less fat partition



On Sat, Sep 16, 2000 at 01:00:38AM +0200, Oswald Buddenhagen wrote:
> > I guess that's the big question:  what *is* the tar magic that I'm 
> > 
> according to /usr/share/misc/magic gnu tar archives contain the magic
> "ustar". however, i found, that it's not at the beginning of the archive.
> the archive starts with the name of the first archived file/directory
> padded with a bunch of zeroes.

A tar file comes in blocks of 512 bytes.  First is the filename and
then comes other things including the word "ustar".  After this header
comes the file and then comes many more header/file combinations.  So
you should see "ustar" as many times as there are files in your tar
file.

If you want all the gory details, download the tar source package and
read tar.h.  

Good luck,
Chris



Reply to: