Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Use Secure Empty Trash to reclaim hard disk space' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: babbage on Dec 15, '03 11:47:04AM
Testing this hint revealed something else of interest. I had an empty trash can, so I duplicated a PDF and threw it away. Selecting Secure Empty Trash in the Finder, I expected a quick process as the one file was overwritten. Instead, a progress bar appeared, showing 500+ files being securely erased. Based on this experiment, it seems that you can still securely erase files even after emptying them from the trash. I haven't tried to do any low-level work to verify that this is indeed true, but it sure seems like it worked.]

That just makes sense. Pretty much all operating systems "cheat" when you ask them to delete a file: rather than literally removing the contents of that file from the disc, the system sets a flag saying, in effect, "the region of the disc previously occupied by file A2340 is now available for reuse." (Or, more accurately, it just quietly adds that region of the disc into the general pool of space available for writing.)

However, at this point, the only change is that a flag has been set; most or all of the contents of that ex-file are still sitting on the disc's surface, and they will remain there until the system decided to use that space for some other file. This is more efficient than literally wiping out the contents of the old file, and it probably helps extend the lifespan of your disc as well due to less wear & tear.

On the other hand, a "secure delete" feature, no matter what operating system it's implemented for (Panther in this case, but the idea would be the same anywhere), does go and literally purge the contents of deleted parts of the disc. That's why you saw so much activity -- the system was scanning over those 'flagged as available' regions of the disc, no matter how old they were, and actively removing the data from those parts of the disc. The results you saw are more or less exactly the ones that would be expected.

I personally wouldn't rely too heavily on this trick. The extra disc activity involved probably shortens the lifespan of the disc (and all hard drives will fail sooner or later, it's just things like this that help determine whether it'll be later or a lot sooner). Moreover, I just tried it and my disc space available didn't change noticably -- but then most of the time I delete files with the rm command, which may be removing the contents in a way different from the Finder (the rule of thumb with Unix is that you should never assume a deleted file will ever be recoverable without drastic measures, which suggests partly that rm or the system calls it makes are doing a more thorough purge than most systems' (e.g. the Finder, Windows Explorer, etc) delete routines provide.

Interesting trick, but I personally would save it for when you're desperately low on space, or when I actually want to securely delete a file; I don't like putting more stress on my hard drives than necessary, and this hint seems likely to do that.

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: simX on Dec 15, '03 06:21:08PM

Your explanation doesn't account for the fact that more hard drive space is being freed after the secure empty trash. The fact that emptying the trash regularly just marks files for reuse doesn't account for the fact that the empty space on the hard drive is increasing after the secure empty trash by an amount LARGER than the size of the files in the trash.

Whether you're securely emptying the trash or emptying it regularly, the operating system still marks all that space as free, so the operating system should free the same amount of space, regardless of whether you use the secure or the regular mechanism. So your explanation just doesn't make sense.

A more likely explanation is that the secure empty trash deletes unused cache files and/or swap files in the system, as one other poster suggested.



[ Reply to This | # ]
10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: the1truestripes on Dec 16, '03 09:26:37AM
I personally wouldn't rely too heavily on this trick. The extra disc activity involved probably shortens the lifespan of the disc (and all hard drives will fail sooner or later, it's just things like this that help determine whether it'll be later or a lot sooner).

The primary thing that "ages" hard drives is spinning them down and up, so having a "hard disk sleep time" will wear your drive a lot faster then this. Most of the stuff that gets used when reading/writing the disk is either always going anyway (drive spinning), or all eletronic (read write heads). The only thing you are putting "undue stress" on is the seek motor, and you are not giving it that much of a workout.

This isn't like reving your car up to the red line "because it sounds cool". The wear on the drive is very minor, and probbably less then a lot of other things people do (at least on laptops).

[ Reply to This | # ]

10.3: Use Secure Empty Trash to reclaim hard disk space
Authored by: johnsawyercjs on Mar 13, '05 04:41:56AM

If you could KEEP a hard drive spun down for a significant amount of time (a half-hour or longer, to allow it to cool down) when it's not being accessed, that might increase the life of the drive, but if you have only one drive in your Mac, that drive is constantly being accessed while you're using the Mac, so a spindown setting would be pretty useless in that situation since the drive would constantly be spun down and up again, and this might add to the wear and tear caused by a hard drive's main enemy, heat. The Energy Saver prefpane's setting "Put the hard disks to sleep when possible" doesn't let you set how much user inactivity time after which the drive is supposed to spin down, so who knows what figure it uses? If it spins down after only a few minutes of user inactivity, many Macs will spin their drives down and up over and over, as the user pauses or steps away from their Mac for a few minutes throughout the day. I think some third-party utilities let you set the delay before a drive spins down; but if the drive isn't able to stay spun down for more than a half-hour or so at a time, a spindown setting would probably be useless or worse since it wouldn't have time to cool down substantially.

When a hard drive isn't suffering extra wear and tear by being spun down and up constantly, the primary thing that ages a drive is heat, which the drive generates plenty of, due to the friction of its spinning, and makes it more susceptible to the heat generated by the processor chip, which can generate more heat than the hard drive (especially the G5 processor)--the rest of the circuitry in the Mac doesn't tend to generate nearly as much heat. Heat wreaks havoc with everything in the drive--the read/write heads, the drive's controller board, etc. Manufacturers put a heat sink and fan on the computer's processor chip, and some also provide a fan blowing air over the hard drive (some of Apple's designs do), but it might be useful to put a fan right on top of the hard drive (actually about a half-inch above it for clearance/airflow).

You'd think a Mac with more than one drive, in which you're not conciously accessing the secondary drive, would be a candidate for spindown control on the secondary drive, but one problem with the Mac OS (and others?) is that it often looks at volumes that you don't access, when you decide to access another volume, so that if you (or the OS) access a file on one drive, and you have one or more other hard drive mechanisms connected to your Mac that have spun down, OS X will often spin up all attached drives. I don't know why, but it usually makes useless any spindown control settings, unless you're in the habit of often not using your Mac for stretches of a half-hour or longer. Only sleep mode will spin down a hard drive and keep it spun down until you decide to access it (usually). So, with this unfortunate spindown override, having a spindown setting active might actually wear out a drive faster, since it won't be given enough time in a spun-down state to cool off substantially. A drive that's always spinning will probably induce less wear on its bearings, than one that's always spinning down and up again--in fact, these days, a drive that's always spinning will almost always suffer the failure of any other part before its bearing fails.



[ Reply to This | # ]