[lug] compressed cpio archive problems
D. Stimits
stimits at idcomm.com
Sun Nov 18 12:35:55 MST 2001
I can't answer your question, it'd involve knowing the exact compression
routine down to the way it stores metadata and how itdecides on end of
files. But the part you might be interested in knowing is that
"uncompress" has been available on most linux distributions for a long
time. I know I have it with RH 6.2 through 7.1. If you don't have it,
look for rpm (or other package format) "ncompress".
D. Stimits, stimits at idcomm.com
"S. Luke Jones" wrote:
>
> Any uncompress/gunzip gurus out there? How about cpio experts?
>
> Back in the day, I had some files I wanted to keep around forever
> so I stored them as compress'ed cpio archives. (Dumb twice, but
> there it is.)
>
> Nobody has uncompress anymore (thanks a lot, Unisys) but gunzip
> has the equivalent capability. Some of the .cpio.Z files give me
>
> $ gunzip foo.cpio.Z
> gunzip: foo.cpio.Z: corrupt input. Use zcat to recover some data.
>
> and the man page is pretty unhelpful. (It says zcat will read up
> to the point of failure, but no hints as to how to skip the bad
> part and continue on after. Perhaps that's not possible with .Z
> files, but I'm hoping it is.)
>
> Not all the .cpio.Z files got corrupted that way. Some have a
> different type of problem:
>
> $ file bar.cpio
> bar.cpio: ASCII cpio archive (pre-SVR4 or odc)
>
> and when I do (excuse the useless use of cat)
>
> $ zcat bar.cpio.Z | cpio -i -t -d -H odc
> -rw-r-Sr-- 1 719 124 1166 Mar 3 1989 graphics.two/clipper.c
> -rw-r-Sr-- 1 719 124 657 Feb 22 1989 graphics.two/legal.c
> -rw-r-Sr-- 1 719 124 892 Mar 3 1989 graphics.two/liggs.c
> cpio: warning: skipped 1247 bytes of junk
> -rw-r-Sr-- 1 719 124 3925 Mar 21 1989 graphics.two/omath.cpp
> cpio: warning: skipped 1 bytes of junk
> -rw-r-Sr-- 1 719 124 15526 Mar 3 1989 graphics.two/menu.c
> cpio: premature end of file
>
> so I was hoping there was some way of figuring out why the end
> of file was unexpected and if that means anything is actually
> missing.
>
> --
> Luke Jones luke vortex frii fullstop com
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list