The Linux-based Ubuntu operating system does not come with an undelete application out of the box, but due to the open source nature of Ubuntu, you can easily install software that can aid in recovering accidentally deleted files. "Foremost" is a tool available in the Ubuntu software repository that was designed by the United States Air Force to discover and rebuild files that have been deleted from Linux-formatted hard drives. The software originally served strictly forensic purposes until it was released to the public for consumer usage. Foremost is a command line tool that can undelete files that have been removed months ago. As with any data recovery package, Foremost is most effective when used immediately after the file is accidentally deleted.
- Skill level:
Launch Terminal by selecting "Applications," "Accessories" and then "Terminal."
Type "sudo apt-get install foremost" and press "Enter" to install Foremost. You will need to enter your administrative password to continue.
Type "sudo fdisk -1" and press "Enter" to determine the mount location of the hard drive on which you need to undelete files. In particular, you will need to note the "Device Boot" name (it will be displayed as "/dev/[PARTITION]" where partition is the name of the hard drive) for the hard drive you need to recover from, as this name will be used in proceeding steps.
Type "sudo mkdir /recovery/foremost" to create a recovery directory that is located in the root folder of the system.
Type "sudo foremost -w -i /dev/[PARTITION] -o /recovery/foremost" and press "Enter" to scan the hard drive for recoverable files. Be sure to replace "dev/[PARTITION]" with the correct device name as noted above.
Type "sudo foremost -t [FILE TYPE] -i /dev/hda -o /recovery/foremost" and press Enter" to undelete files of a certain type. Replace "[FILE TYPE]" with the file extension (such as jpg, txt, doc, zip, mpg, etc.) of the file you wish to undelete. The files will be restored to the "/recovery/foremost" folder that was created.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for