Scalpel: Easy File Rescue

groovydaddy
  13 years ago
  5

We've all been there -- not paying attention as well as we need to, and next thing you know, you've deleted your USB, or your external hard drive. Well, this just happened to me, and I found a way to recover the files.

Scalpel is a CLI program that is uber easy to use, and it actually works!  First thing first, download and install Scalpel.  Simple enough to do from the terminal:

sudo apt-get install scalpel

Enter your password to allow root privileges, and BAM -- installation complete! Now that Scalpel is installed, you'll need to configure the program to recover file types by uncommenting the respective file types you need to recover in the config file.  For those who may not be familiar with commenting and uncommenting, here is a brief explanation: Commenting a line of code means placing a '#' at the beginning of the line so that the compiler/interpretor will ignore this particular line during program execution. In order for the recovery be productive, you MUST uncomment the file types you wish to recover in the configuration file. The config file is located in the /etc directory, as shown below: 

/etc/scalpel/scalpel.conf

***EDIT 04/22/2011: Uncommenting is removing the "#" from in front of a line of code so that it will be executed.  In the /etc/scalple/scalple.conf file, removing the "#" marks from the beginning of the file types will uncomment them and allow the program to search the particular file types.***

Now, let's get to recovering! In your terminal emulator, enter the following to get Scalpel started:

sudo scalpel FILE/OR/DISK/TO/RECOVER -o /PATH/TO/WHERE/YOU/WANT/TO/SAVE/RECOVERED/ITEMS (all on one line)

Since I was working with such a large external drive (320GB), I chose to create my recovered items folder in the 'var' directory. This is what my command looked like:

sudo scalpel /dev/sdc -o /var/scalpel1

Now, just kick back and let it run. If you're recovering an entire HDD like I had to do, this process will take a while... ...LIKE ABOUT 12 HOURS!! Nevertheless, if I had been paying attention to what I was doing in the first place, I wouldn't have to sit it our anyway. If you're recovering a directory (/home/user/Documents/Personal), a USB thumb drive, SD card, or something else that is relatively small, it won't take nearly that long.

I hope this is as helpful to your guys as it was for me! And in the future, let's pay a bit closer attention so that we don't have to use this on our own equipment again!

Comments
Jac978 13 years ago

Great tutorial thanks a lot!


groovydaddy 13 years ago

Yes, this is from the forum. :) I wrote the original post for this on the Mint forum, and thought this would also be an appropriate place to share this information. I hope you never have to use it, but if the need arises, Scalpel is a really good tool.