MMISoftware Blog
News and views of Mac OS X and iPhone Programming
 
 

I came across a handy little Unix command today… for deleting files securely, from the command line.

OK, here was the problem….

I was ‘decommissioning’ an old iMac for a client, and I mean a really old iMac… it was running 10.2.

First, 10.2 doesn’t have a built in ‘Secure Empty Trash’ in the Finder menu, so I needed another method. Now, I didn’t have a 10.2 install disk with me so I couldn’t use the disk utility on the CD, I couldn’t use the 10.5 disk I was carrying as there was no DVD drive. Solution, mount the disk of the iMac on to my MacBook Pro running 10.5, open the Terminal, use the cd command to move over to the mounted disk, and then use srm to delete the files.

If you run man srm in the terminal you will get the full run down on the command, but basically it “removes each specified file by overwriting, renaming, and truncating it before unlinking. This prevents other people from undeleting or recovering any information about the file from the command line.”.

Running the command srm -rv, the -r removes the contents of directories recursively, and -v means the command reports what it is up to. Worked a treat!

Leave a Reply

Search


 

Subscribe

    Subscribe to MMI news

    Enter your email address:

    Delivered by FeedBurner

    AddThis Social Bookmark Button
 

Categories

 

Archives

 

Spam caught:

 
 

MMISoftware Blog is proudly powered by WordPress
Domain services and hosting by MMISoftware
Entries (RSS) and Comments (RSS).