{"id":201,"date":"2009-02-12T06:59:10","date_gmt":"2009-02-12T11:59:10","guid":{"rendered":"http:\/\/installingcats.com\/?p=201"},"modified":"2009-02-12T06:59:10","modified_gmt":"2009-02-12T11:59:10","slug":"secure-delete-files-in-terminal-on-os-x","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2009\/02\/12\/secure-delete-files-in-terminal-on-os-x\/","title":{"rendered":"Secure Delete Files in Terminal on OS X"},"content":{"rendered":"

Securely delete files on Mac OS X in the Terminal by using srm<\/strong>:<\/p>\n

srm <filename><\/pre>\n

This will delete the file, then rewrite random data over the spot on the hard disk where the file was previous stored several times to prevent any file recovery attempts.<\/p>\n

A regular delete using rm<\/strong> in the Terminal will only remove any pointers to the file itself, but this information can be recovered using file recovery and undelete tools.\u00a0 This is similar to erasing an entry in the telephone book for someone’s house and phone number; the house is still standing and telephone number is still valid.\u00a0 Using srm<\/strong> would send a bulldozer to the house to tear it down and break it into bits so small, it would be difficult to tell that a house ever stood there.<\/p>\n

Securely deleting files is useful when you need to destroy a password file.\u00a0 For example, I keep a file that is pgp encrypted with all my passwords within it.\u00a0 When I need to add new passwords, I decrypt the file, add the new username\/passwords, then re-encrypt the file.\u00a0 Afterwards, I need to securely destroy the text file that I updated.\u00a0 For that, I use srm<\/strong>.<\/p>\n

Read more about srm<\/strong> at Wikipedia<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

Securely delete files on Mac OS X in the Terminal by using srm: srm <filename> This will delete the file, then rewrite random data over the spot on the hard disk where the file was previous stored several times to prevent any file recovery attempts. A regular delete using rm in the Terminal will only […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[227,228],"_links":{"self":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/201"}],"collection":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":0,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"wp:attachment":[{"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/installingcats.com\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}