How to archive several files with tar?

der Mouse mouse at thunder.mcrcim.mcgill.edu
Thu Jun 20 19:13:05 AEST 1991


In article <2742 at root44.co.uk>, gwc at root.co.uk (Geoff Clare) writes:
> Once tar has written out the size of the file in a header block, it
> must write exactly that many bytes of data as the file's contents,
> even if the file changes size.  Otherwise the output tar archive will
> be corrupt and unusable.

Not quite.  Note that the tar canister will still be usable provided
only that the expected number of data blocks are present.  It would not
generate broken canisters - though I must agree it would be bad
practice - for a tar to silently ignore file size changes which don't
change the number of data blocks occupied by the file.

("data blocks" here refers to tar blocks (of 512 bytes), not anything
to do with filesystem blocks.)

>> I was talking about the "worst case," i.e. a poor version of tar.
> I claim categorically that such a tar is broken.

I agree.  But *I* have certainly come up against plenty of broken
software; haven't *you*?

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.questions mailing list