[NCLUG] fixing corrupt cpio archive

S. Luke Jones luke at frii.com
Mon Nov 19 20:36:30 MST 2001


Aaron D. Johnson wrote:
> Luke Jones wrote:
> > 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.
> 
> zcat stopped feeding bytes to cpio.  cpio wasn't expecting the end of
> the archive to occur at the point that zcat gave up.  You shouldn't

To be sure, the example could lead one to that conclusion, but
in fact the same thing occurs if I do
	$ zcat foo.cpio.Z | cpio ...
or
	$ gunzip foo.cpio.Z
	$ cat foo.cpio | cpio ...

In that case it's the filesystem that stops feeding bytes to the
file handle bash associates with the pipe to cpio.

> But you're basicly SOL.  :(  FWIW, you'd probably be just as bad off
> had you used gzip and tar.

Am I just weird or is it reasonable to expect an archive format
to include sufficient redundancy to support a certain level of
bit-error recovery? Is there a popular archive format that does?
(These days I mainly use zip, because it's cross platform: Windows,
all forms of UN*X, and the Java standard library. Also, I detest
tar's command-line semantics. (I hear great things about the
simple-to-decode byte layout however.))


-- 
Luke Jones  luke vortex frii fullstop com



More information about the NCLUG mailing list