What Happens When We Delete a File [2 ways to recover]

what happens when we delete a file

We use computers, Mobile phones and other such devices in our day to day life. In a sense, they a=have changed the world and the way we interact over the last 20 years. But most of us are unaware of the inner workings of such devices. Tech Explained is a small initiative on our part to explain simple facts to you. Here, We shall look at deletion, such as What Happens When We Delete a File? How do data recovery Software Work? and how to delete files permanently. without taking more time, let’s get started.

For other articles explaining How tech works, check Tech Explained.

How are files stored in a storage device?

In order to find how devices delete a file, we should first find out how they are stored. Only then can we fully understand what happens when we delete the files. Files are a group of data, that when accessed in order, gives information that is then used to process/display to the user. But in order for the OS to know where a specific file starts and ends, There is a separate section in the storage device, where information of files like location, the start of the file, end of the file, format etc, which is first accessed when a file is requested.

How are files stored in a storage device?

The actual way this is done varies across partition types, ie EXFAT and NTFS (some of the most popular partition types used by android and windows respectively) store and access this differently, but their essential function is the same. Now, whenever a new file is saved or created in the drive, it is then added to this portion of the disk after completion of the transfer. When a file is required by the OS, it checks for this information and accesses the file accordingly.

What Happens When We Delete a File?

Have you ever wondered why copying/reading files from your device take so long, when deleting essentially takes less than a second, no matter how large the file is? If you haven’t tried to copy a file from one device to another, or from a partition to a different partition of your device. Then see how much time it takes to delete the same file. This is because the actual file is not deleted when we delete a record, rather the entry on the table.

What Happens When We Delete a File?
Pointer to file 3 is not present, but file 3 is still present.

That means, the file’s data (made up of ones and zeroes, stored in the disk) is not deleted, But rather, an entry in the table that specifies the details of the file, and tells the OS that such a file exists is deleted. in other words, instead of removing a file in the library, the entry in the registry is removed, so that for someone who checks the register for some books, the book that we deleted never exists.

Why is deleting a file done so?

There are tons of Processes that need to be done for even simple processes like copying a photo or Browsing the internet. Our Computer does a lot of hacks and workarounds in order to make sure that we don’t have to wait a long time. Without these little hacks, our computer would be much slower than what we are accustomed to. for example, when we see photos in our gallery or edit photos on our mobile Phone, what we see is a scaled image of the real image that might be less than a tenth or even fiftieth of the original photo, so that each operation we don’t take entirety to get completed.

Just like that, deleting a file takes up time, resources and even cost lifespan of storage devices (In the case of electronic storage like flash drives and SSDs). and deleting a file is not like deleting an actual Physical object, as both 0 and 1 are interpreted as information. So we cannot delete a book, we can only change the letters.

How do data recovery software Work?

Like we told in the example of removing a book from a library, by removing its name from the register, we told that the book does not exist for someone who checks the register for that book. But the Physical book still exists. In the same way, the photo, video or any other file you deleted is still present on the disk.it is Just that the System does not know what file it is/where it starts or where it ends.

How do data recovery software Work?
Reccua scanning for deleted files

This is where File recovery software like reccua or alternatively Test Disk comes in. instead of reading the files through the API given by the operating system, this software check all the available space in a disk, looking for combinations that might mean it was part of some file. it then creates a file with the available data (Some of the spaces might have been overwritten, inaccessible anymore) where this program fills with random data which is why there usually occurs blurs/noise in images/videos text files etc.

Can we Get all the deleted data?

As much as this seems a pretty good idea, It does not work that way. Once a new file is written in the same location as the deleted file, it becomes inaccessible, as there is no way of knowing what existed there before. Drawing analogy to the library. it would be similar to erasing and writing a new book on the pages of the new book, even someone who checks for the old book will not get the data.

How to delete files permanently?

For many people, The idea that deleted files can be recovered will be quite scary. smartphones and computers have become a big part of our life that much confidential information is stored in our devices over time. What happens when someone gets access to your device? What if you want to sell your old laptop/mobile phone or hard disk? We certainly won’t want someone to suddenly have access to all our files… RIght?

there are two ways you can make sure other people won’t get your data

  1. Filling the storage with junk files:As we told earlier, the actual combination of Zeroes and ones are only changed when some new file is written over them. To make sure any leftover files are present in the storage, fill your entire storage with some nonsense, like films or songs, and then format the device.
  2. Using software : The softwares that we use to read deleted data such as reccua also has an option for ‘deep deletiton’, whre the storage space of deleted file is overwitten by some random text, sop that the old data is erased permanently.
How to delete files permanently?
Some random data has replaced the actual data of file 3

Hope you liked this article. To Know more about such in-depth working of devices, check out the other articles on our site. If you want any help regarding electronics, Contact us on chat, or WhatsApp at 7025692254

Leave a Comment

Your email address will not be published. Required fields are marked *

Auto
Scroll to Top