Thursday 24 January 2013

Recovering corrupted files in Linux

There are many compression technique that you use and compress a file in Linux.

Few techniques are gzip, tar and lot more.

At times when you decompress/uncompress a file after a long time you may get few errors like.

"Unexpected EOF." "Files not in gzip format" or "Files not in gz format" something like this.

This is because the files may be corrupted.

There is a recovery tool kit and it is mainly for gzip but this can also be used for tar.gz too.

STEPS FOR RECOVERY :

Go to the link http://www.urbanophile.com/arenn/coding/gzrt/

And click on the gzrt-0.6.tar.gz link, then gzrt-0.6.tar.gz file will be downloaded to your machine.

Go to the specified location and do the following.

$ tar -xzvf gzrt-0.6.tar.gz
$ cd gzrt-0.6
$ make

Then copy the corrupted file to this folder and execute the following command.

$./gzrecover ABC.gz

Then the recovered file will be in the name of ABC.recovered

Hence there is no problem in dealing with corrupted files in Linux any more. :)

No comments:

Post a Comment