Search code examples
gziparchivecorruptrecover

How can I recover files from a corrupted .tar.gz archive?


I have a large number of files in a .tar.gz archive. Checking the file type with the command

file SMS.tar.gz

gives the response

gzip compressed data - deflate method , max compression

When I try to extract the archive with gunzip, after a delay I receive the message

gunzip: SMS.tar.gz: unexpected end of file

Is there any way to recover even part of the archive?


Solution

  • Are you sure that it is a gzip file? I would first run 'file SMS.tar.gz' to validate that.

    Then I would read the The gzip Recovery Toolkit page.