View Single Post
Old 08-20-05, 10:34 AM   #9 (permalink)
FleshWound
Aximsite Minor League
 
Join Date: Jul 2005
Location: Dedham, MA
Posts: 212
Thanked 0 Times in 0 Posts
Originally Posted by sniffs
It's kind of the same way when you delete something out of the recycle bin or move a file on your hd.. It's not all imediately done, it's slowly done in the background over the next few days.. I am not sure if the HD's cache takes part in this, or if it's dont byte by byte slowly but I do know if you put files in the recycle bin, and delete them, it is not removed imediately, it's appearance in the window panel is gone and windows "tricks" the HD into adjusting the space, but it is not gone. That is why you can use undelete software and recover it.


I have no idea what you're talking about or where you came up with that information.

When you delete a file from your hard drive, the file's entry is removed from the FAT (File Allocation Table) under FAT/FAT32 or MFT (Master File Table) under NTFS. The FAT or MFT is essentially a list of every file and where it physically resides on the hard drive. If a file is listed there, the space that file takes up is listed as in use and cannot be written to by the OS (unless you're updating that particular file, of course).

When you delete a file, its entry is removed from the FAT/MFT and the space that file was using is now, for all intents and purposes, marked as free space.

There is no purposeful staggering of the delete process. The file will phyically remain on the hard drive until it's overwritten (because the OS now sees the space as free); this could happen 2 seconds after you delete the file, or 2 decades. If you delete a file and then never write another bit of data to that drive then that file will physically remain there indefinitely.

As for moving files, that also happens immediately . . . sort of. If you move the file from one location to another on the same drive, then the FAT/MFT is simply updated to reflect the new location of the file; the file itself is not physically moved. If you move the file from one drive to another, then the move occurs immediately.

There is no "tricking" of the hard drive into thinking anything. The OS doesn't tell the HDD anything in relation to what files are on the drive or where they are. It's the other way around; the drive tells the OS what files are there and where they are located.

The used/free space reporting you see in the OS is coming from the OS to you; not from the OS to the drive or anything like that.
FleshWound is offline   Reply With Quote