Steve Bergman <[EMAIL PROTECTED]> wrote: > If a file changes while tar is reading it, tar returns the same code as > when there is a major problem like a tape write error. > > This makes it unusable for automated nightly backups. It is perfectly > reasonable to want to include, for example, log files in the backup, > which might be appended to while being read.
If the file is appended, tar exits with zero exit code. Try this test: COUNT=100000 dd if=/dev/zero of=file count=$COUNT dd if=/dev/zero of=file count=$COUNT seek=$COUNT & tar cf archive file echo $? It gives: tar: file: file changed as we read it 0 However, if the file is trucated, tar exits with status 2, indeed. > Certainly, it is reasonable to return a nonzero code in the case that a > file changes while being read, but it should not be the *same* nonzero > code as for more serious problems. Yes, I agree with that. Regards, Sergey _______________________________________________ Bug-tar mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-tar
