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

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.