Recovering a accidently deleted file in Ubuntu

I'm using ubuntu 9.10 and accidently deleted a specific file within a directory on my system. I checked in the Trash bin and could not locate the file. I deleted it 10mins ago, are there any tools available that I can recovery this file? It's a really important file.

Any help would be highly appreciated

My partition is ext4


There's nothing reliable. extundelete runs through the raw filesystem, and restores things that look like files to a recovered file directory. It's for ext3, but its creators claim some success with ext4.

The risk is that your file gets overwritten by later writes, so that there is nothing to recover. Or that the program is defated by some quirk of ext4fs.


Also, testdisk might work.

TestDisk is OpenSource software and is licensed under the terms of the GNU General Public License (GPL v2+).

TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.


Install scalpel in Ubuntu using terminal:

$ sudo apt-get install scalpel

Then run the following steps to recover your files.

Create a folder name lostdata.

sudo scalpel and drive path which you want to recover. -o is used to generate recovered files to folder lostdata.

$ sudo scalpel /dev/sda1 -o lostdata

Note: there’s no guarantee that Scalpel will succeed in recovering your files, but at least there’s a chance. Perhaps this post will help you.