A Staff Report from the Straight Dope Science Advisory Board

How is it possible to "undelete" computer files?

Dear Straight Dope:

If I delete files from my hard drive, how am I able to "undelete" them? Shouldn't they be gone?

Deleting files is sort of like losing your car keys, they're not gone, just lost. A file on your hard drive is more than just a spot on the drive where the data is stored. The computer must also keep track of just where it put the file. It does this by recording the location of the file in the directory that contains the file. When you delete a file, the record of its location is removed from the directory, but nothing really happens to the spot on the drive where the data in the file is actually stored. It's just marked as "free space." If you make another file and use up some of that "free space" that made up the old file, well, you can't get the old file back. But until that point, the original data is still sitting on the drive and and the appropriate piece of magic software can link up all the pieces and recreate the original file.

Some file systems (methods of keeping track of files and directories) even have built-in support for "undeleting," a special operation must be performed before deleted file's space is actually reused. Likewise, there can be file system support for keeping multiple versions of files. Or, contrarywise, high security file systems will take the time to write over the actual data of a file upon deletion so that it can't be "undeleted."

It turns out that faint magnetic traces of the original data can still linger on the spots where a file lives even after the original file has been overwritten multiple times. Someone willing to pay enough money can recover data from a drive that's been not only wiped blank but also subsequently written over, so don't let the CIA get a hold of your old computer. The truly paranoid will use an encrypted filesystem, one that ensures any data written to the disk is scrambled.

Related Posts with Thumbnails
Staff Reports are written by the Straight Dope Science Advisory Board, Cecil's online auxiliary. Though the SDSAB does its best, these columns are edited by Ed Zotti, not Cecil, so accuracywise you'd better keep your fingers crossed.

Recent Additions:

A Straight Dope Classic by Cecil Adams
A Straight Dope Staff Report by SDStaff Mac, Straight Dope Science Advisory Board
A Straight Dope Classic by Cecil Adams
A Straight Dope Staff Report by SDStaff Dogster, Straight Dope Science Advisory Board
A Straight Dope Staff Report by SDStaff Ian, Straight Dope Science Advisory Board
A Straight Dope Classic by Cecil Adams
A Straight Dope Staff Report by SDStaff Ian, Straight Dope Science Advisory Board
A Straight Dope Classic by Cecil Adams
A Straight Dope Staff Report by SDStaff Ian, Straight Dope Science Advisory Board
A Straight Dope Staff Report by SDStaff Melis, Straight Dope Science Advisory Board

Send questions for Cecil Adams to: cecil@chicagoreader.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope! Your direct line to thou- sands of the smartest, hippest people on the planet, plus a few total dipsticks.

Publishers - interested in subscribing to the Straight Dope? Write to: sdsubscriptions@chicagoreader.com.

Copyright © 2017 Sun-Times Media, LLC.