Handling tar and EOF error

I lost the URL of the page where I discovered this tip, but nevertheless, I had a corrupt *.tgz archive. When I tried to extract the contents, I kept getting this error:

tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

I found that when I extracted the contents using

gunzip < corrupt_tar.tgz | tar xvf -

I still received the errors, but I was able to read more of the archive then when I used

tar xvfz corrupt_tar.tgz

This entry was posted in Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>