Hi. The -v option is ignored when stdout is redirected: on RHL60: % echo / | cpio -ov > /dev/null / 1 block % echo / | cpio -ov -O /dev/null / 1 block on RHL61: # echo / | cpio -ov > /dev/null 1 block # echo / | cpio -ov -O /dev/null / 1 block 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 issue...
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. ***