I'd like to add that testdisk is only part of the solution. Its purpose is to restore lost partitions while things like file recovery belongs to applications such as photorec and foremost.
As Pixellany pointed out, the files are not deleted but they have lost their unique names (unless the disk was zeroed, which is a lot more racical than a simple rm (-rf). Recovery applications will dig into the disk to recover the files and rename them. The process is not infallible, however, and larger files in particular stand a higher risk of coming out (all) wrong. A 200MB movie, for example, may be cut up and reconstituted incorrectly; other files may be simply run together because the disk no longer holds information that specifies where one files ends and another begins.
Bear in mind that recovering individual files can be a lot more time-consuming than you may think; in most cases the entire partition needs to be scanned and this may result in thousands of restored files that have to be sorted and renamed by the user.
|