Problems with Verbose tar

I've heard of one tar version with a v (verbose) option that writes the verbose information to its standard output, rather than standard error. If your tar does that, be sure not to use v when you're using tar to write to a pipeline. For example, the command that follows would be a disaster if your version of tar has this bug:

% tar cvf - *.txt | gzip > archive.tar.gz

The filenames would appear in standard output, along with the tar archive itself. The result would be a gzipped archive that couldn't be extracted. (You'd probably get a "checksum error" from tar, or something similar, if you tried.)

You can test for this problem by typing:

% tar cvf - somefile > /dev/null tar without v bug a somefile 23 blocks, 44567 characters

That redirects standard output to /dev/null (). If you don't see any verbose output, your tar has the bug.

- JP