Have you accidentally deleted an important file because you are in a habit of using “Shift+Del” rather than delete only?? Well don’t panic. There is a utility named as “scalpel” which helps you in recovering the so called “permanent deleted” files. Actually when you delete a file permanently (Accidentally or By Intention) , It doesn’t get removed from your hard disk. It get stored in certain blocks of the storage device and they continue to exist in the blocks unless you overwrite them with another files. This article will talk about utilities that will help you in the file recovery. It is always recommended that you shouldn’t recover a file from the device when it is mounted. You should always do the recovery process with the Live CD followed by the file searching in the device like in my case device is /dev/sda1 . If you are unable to understand the upper condition, just forget about it. I am not going to bore you with the theory part anymore. Let’s take a look at the utility.
Scalpel is a file system independent recovery tool. It ‘s basically available for the Linux and Mac OS but you can also run it on windows by compiling it using the mingw. Latest version of scalpel is 2.0 . You can install it in Ubuntu by typing sudo apt-get install scalpel. After installing it you need to do some text editing. Scalpel utility has its configuration file in the /etc directory with full path as /etc/scalpel/scalpel.conf . When viewed (using gedit/nano/cat) you will notice that everything is a comment out there. Uncomment the file format which you want to recover. For example in my case I want to recover the .zip file so I will uncomment the .zip file section in the scalpel.conf file just like below.
After that go to the terminal and follow the syntax :
sudo scalpel <device name/Directory name/file name> -o <ouput directory>
Output directory is the directory where you want to restore your deleted files. It should be empty before running the command, otherwise you will get an error. You can also input the deleted filename directly by using -i option.You can see the screenshot of my device search below .
Although utilities are there to recover your file but I would recommend you guys to put a habit of delete only not of “Shift+Del” because prevention is always better than cure 😀
Highly energetic article, I liked that bit.
Will there be a part 2?
I don’t understand how you edit and store the config file from a Live CD, as a CD is read-only…
Does this mean that you install the CD on one (or several) parittions of your hard drive ?
Reblogged this on pacesettergraam.
When a file is deleted, only the pointer to the file is overwritten and the original file will still reside in the blocks of the storage device and you want to recover linux files. So if you have ever faced the dilemma of trying to Kernel for linux recovery software recovery all linux data from hard disk. For more details please visit here : http://www.softwaredatarecovery.net/linuxrecovery.html
I want to recover a perl file, so inorder to do that what should I write in the config file ?
uncomment the perl option from the config file and then follow the process.
Are you sure that the -i fileName parameter specifies the file you want to recover? I don’t think so. I think it specifies an IMAGE file taken of a drive.
Yup we are pretty sure on that one . ‘-i’ stand for the input file to be examined. Explore its man page for more details 🙂
I love flossstuff.wordpress.com , bookmarked for future reference