What happens when you Delete a File?

All of you must be familiar with deleting data as you do it almost every day. You drag emails into the trash and delete personal records to free up space on a computer’s hard drive. But where does this deleted data go, and is it really gone forever?

Sent to Recycle Bin

When you first delete a file, it is moved to computer’s  Recycle Bin (for Windows), Trash (for Mac) or something similar depending on your operating system. The files in these folders can always be recovered by right-clicking the file and then clicking Restore.

Beyond the Recycle Bin

Deleting a file from Recycle Bin (or deleting it directly using Shift + Delete) removes the file name entry from File Allocation Table. Once this file header, or reference is removed, the computer can no longer see the file. The space the file took up is no longer reserved for that file, and any new file can be stored in that location.

However, the file is technically still there on hard drive and maybe recovered (or undeleted) using data recovery software. These software (e.g. Recuva) rebuild the file header and allow the computer to see that file again.

How to permanently delete?

One way to completely erase a file with no trace is to overwrite the data. The future writes to the disk can reuse the freed up space. And if you keep using the disk, the space will certainly be overwritten eventually.

There are also some special tools (e.g. Eraser) which overwrite the data securely and prevent the recovery of deleted data.

 

Refer the link below for better understanding: