Zeroing unused space/securing the mac

AdmiralAK

Simply Daemonic
Hi to all,
I am getting a new mac (well, it's used, but it is new to me) and I am saying farewell to my older mac (running os x). I have gone though, backed up my data, and trashed any specific apps that I installed on the machine which only I had licenses for, trashed the contents of my share and user folders, and emptied my caches.

The question is - how do I completely erase my trash (zero out old data that has been trashed), and is there a way to better protect my older system without actually formating and re-installing everything?


Thanks :)
 
The only way is to use Disk Utility to write Zero's, which will erase the drive.
 
At one point Norton Utilities included a program to wipe the unused space. But of course, Norton has a bad rep now...

You can, of course, erase your TRASH by doing a "Secure Empty Trash" in Finder.

For a brute force method, you could:
1 - Pick a large file of some kind.
2 - Make duplicates of that file until you get an error saying there isn't enough room to make more
3 - Move all these files to the trash
4 - Choose "Secure Empty Trash"
5 - Take a week's vacation while the trash empties.

Unfortunately, I've heard that there are significant crash risks in filling your startup drive so full. So you might want to boot from another drive before doing this, if possible.
 
you can do this relatively simply thus
dd if=/dev/urandom of=/tmp/foo bs=8k
(which will copy from the nonblocking random number virtual device, to a file in /tmp, 10 kBytes at a time, until it runs out of space)
and then just delete /tmp/foo. Or, if you want to be on the safe side
srm /tmp/foo
(which will Securely ReMove the file by overwriting it about seven times with various bit patterns.)

Note that these operations will take a long time, especially if you want to be thorough and use srm.

Note that this will not clean up file slack (unused space at the ends of files that take up partial disk blocks), but then neither will a piece of twenty dollar shareware.
 
Back
Top