bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] tar --diff reports errors to STDOUT


From: Peter Huisken
Subject: [Bug-tar] tar --diff reports errors to STDOUT
Date: Fri, 27 Apr 2012 13:49:26 +0200

Hi,

 

I am Peter Huisken. I work at NXP, a.o. maintaining an internally developed archiving system, used for archiving product data. We rely heavily on GNU tar, for the packing and verifying data. Many thanks for providing GNU tar!

 

The TAR option “—diff” reports differences found on the standard output. This can be a nuisance, when combining with the option “-v”. Both the index as well as the errors are printed on standard output. Example:

 

$ echo xyzzy >xyzzy.txt                         # generate small example file

$ ~/bin/tar-1.26 -cf xyzzy.tar xyzzy.txt       # Create TAR file

$ ~/bin/tar-1.26 -df xyzzy.tar xyzzy.txt       # Verify TAR file

$ touch xyzzy.txt                             # Modify ...,

$ ~/bin/tar-1.26 --diff -vvf xyzzy.tar         # Should fail

-rw-r----- nxp12010/nxp      6 2012-04-27 13:32 xyzzy.txt

xyzzy.txt: Mod time differs                    # Indeed fails, but msg on stdout

$ ~/bin/tar-1.26-rhel4 --diff -v -v -f xyzzy.tar xyzzy.txt | wc

      2      10      86

We do have a simple workaround: egrep the messages NOT looking like an index entry, and assume they are errors. And now the question:

·         Can the errors be printed on standard error instead of standard out?

A suggestion for improving –diff:

·         Is it possible to add an option, to only verify content, and not the meta data, mode, ownership?

 

Kind regards, Peter – and thanks again for providing GNU tar

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]