October 23, 2010
Secure delete with rm on OS X

I discovered this gem in the rm man page on OS X the other day:

-P  Overwrite regular files before deleting them.  Files are
    overwritten three times, first with the byte pattern 0xff,
    then 0x00, and then 0xff again, before they are deleted.

So there you go rm -P will securely delete a file from your disk with minimum hassle (i.e. without having to through the Thrash folder). This might be one of those goodies OS X inherited from BSD. On Linux you have to use something like shred to achieve the same thing.

Addendum: santry on the HN Thread points out the same thing can done via the srm command. Several people also noted that secure delete interacts unpredictably with modern file systems. jrockway points out that full disk encryption should be used in place of secure delete for this reason.

9:02pm  |   URL: http://tmblr.co/Zn_4by1Ia1s9
  
Filed under: cli rm os x security 
February 2, 2009
Add your favorite editors to the Mac Finder

I confess, I still use Vim for most of my text editing.

11:42am  |   URL: http://tmblr.co/Zn_4by4UN91
Filed under: tips vim os x 
Liked posts on Tumblr: More liked posts »