10.3: Secure empty trash from the Terminal

Oct 29, '03 11:20:00AM

Contributed by: raveldcp

So everyone knows that you can now use the "Securely empty trash" feature. What if you want to remove a file but not use the Trash? The new feature in Panther is the command /usr/bin/srm. There are two other options that Secure empty trash doesn't use:

-m, --medium
   overwrite the file with 7 US DoD compliant passes  (0xF6,  0x00,
   0xFF, random, 0x00, 0xFF, random)

-z, --zero
   after overwriting, zero blocks used by file
So, srm -mz [filename] will do a DoD compliant erase and zero the data.

Comments (18)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031025092806502