Have you deleted a file accidentally in Linux and now want to try to get it back? The situation sure sounds like you, and although in some cases the recovery is not possible, yes there are ways of trying to undo the deleted file.
We have complete the tutorial on Linux.com, which also speak of how repair file systems on Linux using e2fsck tool , one of the legendary on Linux and supports ext2, ext3 and ext4.
The most interesting part of the tutorial is by far the recovery of deleted files, which first describe the process that occurs when you delete a file , an interesting analysis for understanding what happens when ran a rm on any. In fact, in the same explanation is a recovery, “a hair” of a deleted file evidence to show the performance of the technique.
From there comes the description of a specific tool to recover deleted files on Linux, called Scalpel. The installation of this utility is trivial, in Ubuntu, for example, is sufficient to sudo apt-get install scalpel – and once installed will have to edit the file / etc / scalpel / scalpel.conf to set the file extensions we wish to recover.
launch utility has this syntax:
sudo scalpel / dev / sdX-o ~ / RECOVERED
Being X the partition number you want to scan and where it is assumed that we had the file deleted. -can process takes an hour or more , depending on the size of the partition, but if we are lucky in the directory we created RECOVERED we can see how the files are looking for.
have to be realistic with this type of tool : file recovery depends on the time when you run. If you have deleted a file and within minutes we realize that we have a good chance to recover so. But if we want to recover a file of months ago, we have much more complicated.
The explanation is simple: during all that time we will have used the hard disk so intense, writing and deleting other data and therefore changing sectors of the disk , which were marked as available when delete the files and therefore may have been busy with other information.
So keep that in mind: if you try to recover deleted files, better be as soon as possible .