Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to securely erase some files. I have used shred on linux systems before, so I looked around and found that shred is part of the coreutils package in macports. I did port install coreutils to install coreutils, but I still can't find shred in the command line.

How can I get shred to work on my mac's command line? If it matters, I'm using Mac OS X 10.7.5 (Lion)

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

port install coreutils adds a g prefix to the names of binaries, so shred is /opt/local/bin/gshred.

share|improve this answer
add comment

OSX has a built in command srm to securely remove files. See https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/srm.1.html. You can also use rm -P to overwrite the files with sequences of bytes three times.

share|improve this answer
    
Sure, but shred lets me set the number of overwrites. These tools don't. Any ideas on how to get that functionality? –  inspectorG4dget Jul 9 '13 at 15:37
    
You can use the -m option for seven overwrites or -s for only one, but I don't think you can specify a specific number. –  Tobi Hahn Jul 9 '13 at 15:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.