Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 7/7/83; site rlgvax.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!tom From: tom@rlgvax.UUCP Newsgroups: net.unix-wizards Subject: Re: need fault-tolerant cpio Message-ID: <797@rlgvax.UUCP> Date: Fri, 8-Jul-83 15:10:22 EDT Article-I.D.: rlgvax.797 Posted: Fri Jul 8 15:10:22 1983 Date-Received: Sat, 9-Jul-83 15:51:26 EDT References: <115@ihu1e.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 30 I don't have a fault-tolerant cpio handy, but here are some quick-and-dirty alternatives: 1) Cpio needn't read a tape. If you have ANY utility to read in a tape and skip over bad spots, use it to read the tape into a file. It is important that SOMETHING be put in the file in place of the bad blocks -- all nulls will do, but DON'T merely skip the bad blocks and make the file shorter. Then try using cpio to read the file. If you are lucky, the bad spots only occurred within one of the archived files. That file will be corrupted, but the rest will hopefully be extracted OK. 2) If that doesn't work, a little knowledge of cpio may help. Each file in the archive is preceded by a header containing such little tidbits as the name, size, permissions, etc. of the file. The very first word of the header is the "magic number" 070707. So here's what you do: Again, read in the file from tape somehow or another. This time its not important that you supply something in place of the bad blocks; skipping them will do. Then write a little program that reads the file and splits it into separate files every time it sees the magic number. This gives you your files, but you will have to manually go in and remove the rest of the header information from the front of the file. Be careful, its not likely to be ASCII. So now your only problem is finding something that will read past a bad spot on the tape. Hope your UNIX version allows it. Otherwise you'd better look around for another system (UNIX or otherwise) that does. - Tom Beres {sesimo, allegra, brl-bmd, mcnc, we13}!rlgvax!tom