Using tar with the 'r' option

Frank Bicknell frankb at usource.UUCP
Sat May 27 04:07:46 AEST 1989


I have used the 'r' option for tar to append additional archives
on floppy devices.  For example,

tar rn0 *

tacks the files from the current directory on the end of
whatever is defined as tar device 0.  BTW... the n option tells tar that
it can seek on that device (unlike a tape which cannot be seek'ed).

On other (non-SCO) xenix and unix systems, I have also been able
to tack things on the end of file archives.  For example:

tar rnf tar.image *

does the same as above, except the output device is the file
tar.image.  I can't seem to get SCO tar to do this right.  It
cuts into the tail end of the existing tar image in the file and
begins appending too soon.

The manual does indicate that one is not able to append to tapes:
that's reasonable since tar doesn't know it's read that last
trailer block of nulls until it has already passed the head.
There's no way short of rewinding and counting blocks to
overwrite that trailer.  (I guess ntar will record the length of
the archive in the first record or something to allow this to be
done in the future... maybe).

Anyway, it is certainly possible to keep track of and seek back
to that trailer record when appending to a file.  Why is it not
done?
-- 
Frank Bicknell
UniSource; 1405 Main St, Ste 709; Sarasota, FL 34236
killer!usource!frankb || frankb at usource.UUCP



More information about the Comp.unix.xenix mailing list