How to recover corrupted gzip files in Linux

Ever come accross corrupted gzip or tarball which couldn’t be uncompressed? No worries, The gzip Recovery Toolkit make it possible for you to recover those files.

Here’s how to recover gzip (or tarball .tar.gz) file in Linux operating system :

  1. First download and compile gzrt
  2. run gzrecover on corrupted gzip — “gzrecover corrupted.tar.gz”
  3. extract the recovered file using cpio — “cpio -F corrupted.tar.recovered -i -v”

Note that however that not all file/data are recoverable using this method. Alternatively, you can use bzip2recover for recovering bzip2 compressed file.