Problems with extracting files using cpio

Guy Harris guy at auspex.auspex.com
Sat Sep 29 06:00:08 AEST 1990


>If resynchronization fails, try changing header mode (c option)

I think S5R3's "cpio" may do that automatically; HP's more recent HP-UX
releases are S5R3-based, right?

>or byte swapping the header (P or s options)."

S5R3's "cpio" doesn't do that automatically, but Sun's does; everybody's
*should* - especially given that the "s" option to the System V "cpio"
byte-swaps *data*, not *headers*, and *cannot* be used to read a
byte-swapped tape, even if you stick a "dd conv=swab" in the way!  You
needs some combination of things that ends up swapping bytes *only* in
the headers and that leaves data *and* pathnames alone.

I assume the "P" option in HP-UX's "cpio" does some form of
byte-swapping that *does* let you read tapes not written with the "c"
option, and written on a machine with the opposite
byte-order-within-16-bit-quantities.



More information about the Comp.unix.questions mailing list