Are deleted files overwritten by new files?

SheerGold

macrumors member
Original poster
Apr 20, 2006
81
0
If there is enough free space on the HD will deleted files be left untouched when new information is written to the HD?

In other words: are they only overwritten when the HD becomes full.

Or they overwritten even if there is plenty of space for the new files?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Fuquay Varina, NC
I think the correct answer is...Maybe.

The space occupied by a file that was subsequently deleted will indeed be overwritten at some point in time. When is hard to determine, as this is up to the firmware controlling the hard drive.

Of course if you really want to delete a file do a "Secure Empty Trash" - this will obliterate it...

My guess is you are looking to recover a file?
 

Sun Baked

macrumors G5
May 19, 2002
14,874
57
They are overwritten when the OS decides to do it.

But the space once occupied by a deleted file basically becomes immediately available for use.

A whole file is unlikely to be overwritten, but a large single deleted file could get corrupted as sections inside the file are overwritten.

Small files could get completely blasted away.

So if you delete a file accidentally, you want to try a recovery app as soon as possible.

Turn off the machine (or stop using it) until you recover the files.
 

MisterMe

macrumors G4
Jul 17, 2002
10,650
29
USA
SheerGold said:
If there is enough free space on the HD will deleted files be left untouched when new information is written to the HD?

In other words: are they only overwritten when the HD becomes full.

Or they overwritten even if there is plenty of space for the new files?
I have not had cause to recover a deleted file since I upgraded to MacOS X. However, I did semiregularly when I used MacOS 8/9. At any rate, my experience is that deleted files remain intact for quite some time. I have recovered files which had been deleted months before. Over time, deleted files become so corrupted by overwrites that they are useless. In that sense, Sun Baked is correct. The quicker you recover an accidentally erased file, the better. However, there is no need to panic. If you delete a file and don't have file recovery software, you have time to buy it and you may continue to use your computer in the meantime.