Red Hat Bugzilla – Bug 6376
broken -v option
Last modified: 2008-05-01 11:37:52 EDT
The -v option is ignored when stdout is redirected:
% echo / | cpio -ov > /dev/null
% echo / | cpio -ov -O /dev/null
# echo / | cpio -ov > /dev/null
# echo / | cpio -ov -O /dev/null
Please note the missing '/'. This happens also with pipes,
and breaks my backup scripts, BTW.
rpm -qf `which cpio` returns:
cpio-2.4.2-13 on RHL61 and
cpio-2.4.2-12 on RHL60.
I've tried both bash and tcsh, so i don't think it's a shell
Patch cpio-2.4.2-stdout.patch changes copyout.c to write verbose messages (-v)
to stdout instead of stderr. Not only do you not see these messages when stdout
is redirected, but the output cpio file is corrupted (because the messages are
now part of the cpio file)! If I rebuild cpio from the sources with all but
this patch applied, it works as expected.
Fixed (by reverting the #3358 stdout patch) in cpio-2.4.2-14.
*** Bug 7889 has been marked as a duplicate of this bug. ***
*** Bug 9545 has been marked as a duplicate of this bug. ***
Why has the fix of this serios bug not found its way into the Errata ?
*** Bug 10026 has been marked as a duplicate of this bug. ***