[lug] compressed cpio archive problems

Tom Tromey tromey at redhat.com
Sun Nov 18 15:33:19 MST 2001


>>>>> "Luke" == S Luke Jones <luke at frii.com> writes:

Luke> Back in the day, I had some files I wanted to keep around
Luke> forever so I stored them as compress'ed cpio archives. (Dumb
Luke> twice, but there it is.)

What system did you use to make the files?  The cpio archive format
has changed a few times.  GNU cpio in theory is compatible with all
the known formats, but ...

Note that using tar format wouldn't necessarily have been any better.
tar also has different variants.

Luke> Nobody has uncompress anymore (thanks a lot, Unisys) but gunzip
Luke> has the equivalent capability.

As others have pointed out, there is an uncompress for Linux.  On my
RHL box it is in the ncompress RPM.

Luke> (It says zcat will read up to the point of failure, but no hints
Luke> as to how to skip the bad part and continue on after. Perhaps
Luke> that's not possible with .Z files, but I'm hoping it is.)

I don't think it is possible.  But don't take my word for it.  Find a
coding expert.  Or you can read the paper on which compress is based;
it is referenced in the man page.

There's probably some small chance that there are bugs or
incompatibilities between the compress you used to create this file
and the current uncompress.  What media did you store these files on?
I.e., is there a reasonable chance that they are really corrupt?
Anyway one thing that might be worth trying is to find a system
similar to the creating system and uncompress and unarchive there.

Luke> cpio: warning: skipped 1247 bytes of junk

One route open to you, which you may not like, is to read up on the
various cpio formats, and then examine the archive file using a hex
editor.  As I recall (I hacked on GNU cpio for a short time back in
1994 or so), the cpio formats are pretty straightforward.  So this
wouldn't be as hard a job as it sounds.

Tom



More information about the LUG mailing list