[ILUG] alternative to tar

Fergal Daly fergal at esatclear.ie
Tue Jun 20 19:59:39 IST 2000


At 19:41 20/06/00, Niall  O Broin wrote:
>On Tue, Jun 20, 2000 at 05:59:15PM +0100, Fergal Daly wrote:
> > Can anyone recommend and alternative to tar? Because as far as I can tell
> > with tar, you have to read the whole tar file to get to the last file.
>
>If the archive is on a tape, then you must read to the end to get the last
>file due to the nature of tape. If it's an archive on a disk, then the seek
>time is negligible.

This is to disk, and tar was designed for tape, although seeks for disk are 
quick, tar doesn't use them. Try extracting the last file in a 100meg tar 
file on a disk and you'll have to wait while it reads all 100megs first and 
then pulls out the last bit. If you look inside a tar file, you'll see 
there is no table of contents to allow you to jump ahead.

What I'm trying to do is take a snapshot of a bunch of files, put it on CD 
and be able to get at it easily, I'd also like to fit it on one cd so 
compression will be required in this case. Obviously gzipping a 
tar/dump/whatever file afterwards is going to break it's seekability if it 
had any in the first place. In fact something like the BBC compressed file 
system, except that's not really a well known/supported format just yet.

>That's what dump (and its companion restore) does. You can't really extract
>files at random - you get a browsing interface from which you select files
>to restore, and then restore them all. But again, if the dump archive is on
>a tape, you have to read to the end to get the last file. In principle you
>can use dump to stdout and pipe it through a compression program, though
>I've never done that, and I don't know how it would work when dumping
>gigabytes of data.

Dump seems as tape oriented as tar and so probably doesn't support seeks 
either.

>Zip does handle permissions, and ownerships too with the right switch.
>However, I think it can only ouput to files, not devices. What exactly are
>you trying to do ?

I've just tested this for a large zip file and it seems to be able to get 
at any file you like without delays which is pretty cool. The compression 
is almost as good as tgz but it takes a hell of a lot longer to make the 
archive. Still it's pretty much a once off so maybe I'll go with zip, 
unless anyone knows of anything better,

Fergal





More information about the ILUG mailing list