Eli5 how is data deleted

405 views

Like where does it go?

In: 3

12 Answers

Anonymous 0 Comments

You can buy a blank book, a pencil, and an eraser. When you write in the book, you put a note in the table of contents:

p2. “Recipe for grandma’s lasagna,”
p7. “Grandma’s will,”
p. 14″Grandma’s horrible secret.”

As long as you have an item in the table of contents, you know you won’t write on that page again.

But let’s say you decide you don’t need to keep Grandma’s Will anymore. So you erase its listing on the table of contents. Now if you go back to the table of contents, you won’t see it anymore. And NEITHER WILL ANYONE ELSE. So now it might still exist, somewhere, but where? And who the hell cares? You’ve decided you don’t need it anymore. Maybe you can find that page by accident, but enh, that’s not really something to worry about unless you REALLY want to hide that page.

The next time you write in the book, you’re looking for a page you can write on. You find the page with grandma’s will on it. But it doesn’t matter, it’s not in the table of contents. So go ahead, grab that eraser, rub out the will, and write on the page.

That’s how file deleting works. You can think of a file as being a page in a book, and when the computer doesn’t need that file anymore, it erases the line in the table of contents. And if the computer wants to write over the pages (or, in this case, file sectors), if it doesn’t see an item in the table of contents protecting that file sector, it will happily write new stuff there.

EDIT to add:

Imporant to remember, though, that if the computer doesn’t write over that file sector, the contents – the words on the page – are all still there. So a determined person can certainly find Grandma’s will again. Just like in your book, until you actually erase it and write over it, it’s still there; it’s just not in the table of contents. Same with computers. The data might not be registered in the file management system, but it’s all still there until it gets overwritten by something else.

You are viewing 1 out of 12 answers, click here to view all answers.