The input is presumed to be a cpio -c archive. While the input is copied to the output, fixcpio checks each archive member for sanity, and discards those that appear to be bad. The program writes the names of archive members copied on stderr, and says
Skipping bad member ``filename''for each bad record. This eliminates the cheerful ``Out of phase--get help'' message from cpio.
The major use for fixcpio is in recovering multiple floppy backups when one disk in the set goes bad. The process for the UNIX-PC is about as follows.
1. Get images of the remaining floppies in files that are in alphabetical order:
# works with up to 99 disk backup sets. # # if, ibs, and count will depend on your machine and # backup procedure. disk=01 while : do echo "Interrupt to quit, return to read disk $disk \c:" read answer dd if=/dev/rfp/021 ibs=1024 count=320 of=disk-$disk dismount -f disk=`awk "{ printf \"%02d\n\", $disk + 1 }" ` done
2. Restore the contents of the disks with fixcpio's help.
cat disk-* | fixcpio | cpio -icdum
Getting disk images from the floppies depends on both the machine and
your backup procedures. You need to know how the floppies are
written before you start recovering, and this might be awkward if
you've lost your hard disk.
Using a temp file is a kludge, needed because you can't seek around on input from a pipe.
Status messages should probably be toggled with a -v `verbose' flag.