cancel
Showing results for 
Search instead for 
Did you mean: 

delete or erase disc space query

shutter
Community Veteran
Posts: 22,212
Thanks: 3,773
Fixes: 65
Registered: ‎06-11-2007

delete or erase disc space query

Hello, I don`t know if this has been covered before, I can`t find it yet so....
I understand that if I "delete" a file, I am only deleting the file name, and the file can still be found on the hard drive.....
I understand that if I "erase" a file, I am overwriting the file and the file name.
So.... How does erasing or deleting files increase the amount of disc space available?
Undecided Huh
5 REPLIES 5
shutter
Community Veteran
Posts: 22,212
Thanks: 3,773
Fixes: 65
Registered: ‎06-11-2007

Re: delete or erase disc space query

Huh Not really, somebody was querying about securely removing files from a HDD, and it occurred to me that what one reply said seems to apply to my query..... If you delete a file  you are only deleting the filename.... the file is still there, and the space is still being used...?  Similarly if you erase a file, you are overwriting it.... file is still there (although now corrupt)  space is still being used.....
The answer that came up on the HDD problem was,..... If you remove the index page from a book, the other pages are still in between the covers..... If you can see the analogy.
Therefore, (and ipso facto.... if you are into latin) when you delete a file, or erase a file, the files are still on the hard drive, and therefore the hard drive should not show any increase in available space ! !???  Huh Huh Huh
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: delete or erase disc space query

When you delete file it can sort of be there still - it gets moved to the recycle bin - but the space it occupied is added to the count of free space on the drive. On the properties of the recycle bin you can specify the maximum amount of the disc space that the files in there can occupy - it will remove the oldest files from there to make room if needed. The oldest files in the recycle bin will also be overwritten as the disk nears capacity.
When you empty the recycle bin the files are fully deleted - but this just consists of removing all the pointers to the files from the directories. The actual sectors on the disk are not cleared and someone with a suitable piece of software could recover the information. Once another file is written over those sectors then obviously the file cannot be retrieved.
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
Strat
Community Veteran
Posts: 31,320
Thanks: 1,609
Fixes: 565
Registered: ‎14-04-2007

Re: delete or erase disc space query

Quote from: jelv
Once another file is written over those sectors then obviously the file cannot be retrieved.

Well not easily anyway but there are techniques......
Windows 10 Firefox 109.0 (64-bit)
To argue with someone who has renounced the use of reason is like administering medicine to the dead - Thomas Paine
7up
Community Veteran
Posts: 15,828
Thanks: 1,583
Fixes: 17
Registered: ‎01-08-2007

Re: delete or erase disc space query

Basically, when you delete a file it sits in the recycle bin. Unlike what Jelv said, it's space is NOT freed.
When you empty the recycle bin, the OS changes the file name and marks the sections on the hard disk as available - In other words it doesn't delete the file but it makes a mental note that it can use the space if needed, and so that space is added up with all the other available disk space to tell you how much you have left.
When you ERASE a file, the filename is changed, the file is overwritten, and then those same sectors are marked as available for use. Thats all it is.
A simple analogy is this:
You have a whiteboard where you scribble various notes all over the place. You find some of your notes are no longer needed. To delete them, you simply draw a big X accross the notes you no longer want - You know that at any time, you can rub out these notes and write new ones there IF NEEDED. Therefore, you know you have that space available, but it doesn't necessarily mean it's blank space.
Erasing, would simply be to rub out those notes straight away and thus create blank space on the whiteboard.
Does that make sense?
I need a new signature... i'm bored of the old one!
shutter
Community Veteran
Posts: 22,212
Thanks: 3,773
Fixes: 65
Registered: ‎06-11-2007

Re: delete or erase disc space query

Sort of ! !  Grin Grin Grin
Thanks to all.... Cheesy