When you delete a file the file system marks that file for deletion and deletes any references to that files location on disk.
As far as the OS is concerned, this space is now clear and that’s reflected through the GUI. The files are still on the disk in the same place, the OS just sees that space as “Oh hey I can store stuff in those blocks of space now”.
The OS doesn’t read a disk and say “How many blocks read 0?”, but rather “How many blocks can I write to?”, a deleted file is marked as blocks the OS can write to.
Latest Answers