Which do you prefer? Ctrl-D or Right click then delete?
Whichever one you use, I bet you just want to get rid of that file, and create some space on your drive.
But, here’s something that might surprise you, or something that drove you here:
What happens when you delete a file? Do they just disappear like the result of Thanos’ snap, or the get hidden like something Loki would do?
Technology is a wonderful thing, and as simple as developers try to make tech tools, there are some sort of complexities happening behind the scenes.
Most users just want to do things on their computer, and get results, without bothering themselves about the struggle computers go through to satisfy their “masters.”
You’re wondering why something as simple as deleting a file is causing this long essay? Well, I’m wondering the same. Let’s backtrack.
What happens when you delete a file?
To answer this question, we’d go through two aspects of computer systems. In tech world, there is something we call the ‘Front-end’ and ‘Back-end’ of the computer.
Putting it simply, what you see when you do things on the computer, that’s the front-end. The many ones and zeros, and those ‘gibberish’ like the ones on the screen of the Matrix trilogy, that’s the back-end.
To use another analogy: when you push the ignition of your car, press pedals, and put the gear on ‘drive’ it moves. That’s frontend – the part you see.
But, under the hood, there are like a thousand engine parts rolling, drilling, plugs sparking, cables sending charges, fuel traveling through pipes, etc. That’s the backend, and something many car users don’t really care about.
So, when you delete a file, it goes to the ‘Recycle bin’ where you can restore it, if needs be. But, after deleting from the recycle bin, it gets out of your reach; disappears.
…but it is still reachable to someone that can use the right tools – that’s where back-end comes in.
Here’s where it gets a little technical.
Computers keep some sort of “spreadsheet” where every file is recorded. Each entry contain filenames, location of the files, and other information. These “spreadsheets” are called series of names – FAT, NTFS, reFS, HFS, XFS, etc, depending on the operating system (OS).
When you delete a file, the entry for that file is removed from the “spreadsheet,” leaving that column empty, and not deleted. Without an entry pointing to the file on the “spreadsheet,” the file cannot be located, and does not appear on the front-end, so the user feels it is gone.
The file still consumes some space, but the space is not accounted for because there is no information about the file on the “spreadsheet.” However, the file will not remain in the void forever, it would later be overwritten when another file needs to use the space it occupies.
Can deleted files be recovered?
Yes, deleted files can be recovered, even if the drive was formatted. But there is a catch: provided the files have not been overwritten by another file.
If you are a Marvel fan, and you saw Infinity Wars and Endgame, then see deleted files as people that disappeared after the blip.
Where did they go to? Nobody knows.
But after the Avengers got the infinity stones, and did their own snap, the people that earlier disappeared, came back.
In this case, Thanos’ snap is the “delete” function; infinity stones is the recovery tool, and Iron Man is the professional that recovered the deleted files.
If you don’t gerrit, forgerrit. 😀
File recovery require the use of specialized tools, and the knowledge of how to use the tools. It’s not as simple as ABC, but perhaps, someday, I’ll write about how to recover deleted files.