About deleting files


It is indeed true that the files you deleted from your computer are not always entirely gone. Remember the post I wrote about the tool to recover deleted data?
Ever wondered why that is? What happens if you delete a file? Allow me to enlighten you…

Most operating systems keep track of where files are on a hard drive. They do this by using pointers. Each file and folder has a 2 pointers, one that shows the beginning of the file and one that shows the end.
Whenever you delete a file, the pointers are removed and the spot on the hard drive is marked as “empty”. The file system now thinks that this data is actually gone and the spot where it used to be is indeed empty. But until the OS writes something on this specific spot, the “old” data is still recoverable.

There is a very good reason why it works like this. Erasing a pointer is a very fast operation. A lot faster than actually deleting the data. And there you have it. Performance is everything when working with computers. So why doing something that takes a lot of time when you can use another method that works a lot faster and doesn’t make a lot of difference for the user.

Small remark, this is only for conventional hard drives, Solid State drives work differently. If you are using a TRIM-enables SSD (which all modern SSDs support, so if you have an SSD, it’s probably available and active). Deleted file are removed immediately and cannot be recovered. This hasn’t got anything to do with performance anymore, there simply is no other way to do it.
Flash cells, cannot be overwritten, in order to reuse them, they must first be erased. If it would work the same way as with other hard drives, the old data should be erased first before the new data can be written. Because of this the “write” operation would seem longer, making it less performant.

In case you wondered, if you deleted a file and want to recover it. Do this as soon as possible, as the OS continues to write files on your hard drive, the chances of overwriting the file you need become bigger. Try to use the hard drive as little as possible when trying to recover a file.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: