Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying extract .tar.gz file it but with no luck

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

the file tar.gz include another file.tar only which is has the issue

when i trying to extract .tar file i got

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

i tried –ignore-zeros –ignore-failed-read with no luck

file type tar.gz: gzip compressed data, from Unix

how could i extract this file even if it corrupted ?

share|improve this question
add comment

2 Answers

You don't. It appears the file has been truncated. How long is it? If you only have the first few bytes then you're done.

share|improve this answer
add comment

are you unpacking the .tar.gz file on the same platform it was made on? there are some differences between older Unix versions of tar, such as the non-GNU versions of tar that have shipped with Solaris, and the GNU tar that ships with Linux, etc. If you're going to unpack an archive with GNU tar, it's best to create it with GNU tar.

how does your system look for disk space? was the disk full when you made the archive, or is it full as you attempt to unpack it?

did you create the archive with a cron job? without output redirection, cron can do funky things to archives due to limitations in the size of output it will allow to STDOUT. If you're making an archive in cron, and you're using -v with tar, try redirecting STDOUT to a file, and STDERR, too. See if that helps. tar -cvf archive.tar.gz /path/ 1>archive.stdout.log 2>archive.stderr.log or something like that.

share|improve this answer
    
i am trying to extract cpanel backup site made by .tar.gz , the problem is this site large over 13 G.B and i think it didn't backup the file as well , so it's corrupted , all i want is how could i skip the corrupted files and extract the files has been packed as well ? –  iLinux85 Nov 5 '12 at 15:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.