Red Hat Bugzilla – Bug 408621
tar -vf /dev/stdout produces corrupted tar archives
Last modified: 2008-05-26 12:57:45 EDT
Description of problem:
When using -v (verbose) and -f (output file) options and specifying /dev/stdout
as argument tar produces corrupted archive.
Version-Release number of selected component (if applicable):
tar (GNU tar) 1.15.1
Steps to Reproduce:
1. tar -cvf /dev/stdout [files or dirs] > output.tar
resulting file is not a valid tar archive. the file listing is mixed with actual
Long description of the problem:
When using -f file listing is printed on stdout. Tar is not checking if the
argument to -f is "/dev/stdout". When not using -f standard output is assumed by
default and tar will send file listing to stderr.
That's bug either in code or documentation. I haven't seen manual page
indicating that -v and -f may lead to corrupted archives. The "-f /dev/stdout"
is not really necessary but it's used to make the command more human friendly.
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. This request will
be reviewed for a future Red Hat Enterprise Linux release.
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
As I'm new tar maintainer - and as the fixed manpage is part of F9/Rawhide tar,
closing that bugzilla RAWHIDE. Feel free to add any comments if you have
something to discuss about that issue.