Why do people say that nothing is ever truly deleted?
Let's say I have a byte in my hard drive that contains the byte 0x00. If I overwrite it with the byte 0x01, how can anyone ever know that it ever contained the byte 0x00?
Why do people say that nothing is ever truly deleted?
Let's say I have a byte in my hard drive that contains the byte 0x00. If I overwrite it with the byte 0x01, how can anyone ever know that it ever contained the byte 0x00?
I don't think they can, if you actually overwrite that area of the hard drive with the magnetic field value corresponding to 0x01 enough times. However, that's not how operating systems work. Operating Systems store a series of file pointers that map to the location of file on the physical disk. When you delete a file, you remove this file pointer, but you do not overwrite the disk at that point.
There are programs that bypass this and write values to the physical chunks of your hard drive thus changing the strength of the field at that chunk. This eliminates the previous value.
I could be incorrect, but there might be statistical methods to retrieve what was probably the value at that chunk, but as I said, I am unsure.
There are also people (Peter Gutmann) who believe that it's theoretically possible to recover, using certain magnetic techniques, data that's been previously overwritten. Although it doesn't seem practical, there's several forensic data recovery services that claim to be able to, at least to some extent, extract data that's been overwritten.
More about his stuff here: http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html and http://www.cypherpunks.to/~peter/usenix01.pdf
Because your filesystem is just an table with file id's and physical addresses which point to data for these entries. If you delete an file you just delete your entry but your data remain in the same place where it was before.
It's only truly deleted if the filesystem decides to later reclaim that unused address, otherwise the data is still there.
In addition to what other people are saying, SSDs make this more interesting.
When you write to a specific location on an SSD, you're not necessarily always writing to the same place. This is done to avoid problems with memory cells wearing out if a particular location is written lots of times. The writes are distributed across the whole disk by copying the old sector and modifying when it's written to the new location. A side effect is that there are old copies of data left lying around. A user, programmer, or even OS has knowledge of this, and can't control it. It's all done in the controller chip on the SSD.
Some modern filesystems do similar things (Copy on Write or CoW), but there it's the OS that has the knowledge of what old data might be available.