Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I vaguely remember hearing about disk wiping, and that you have to flood the disk with zeros, flood it with ones, flood it with random data, and repeat this quite a few times. This is just a general question, as I am not going to have to wipe spy files or other top secret information off a disk. I figured I could use

dd if=/dev/zero of=/dev/diskname

dd if=/dev/urandom of=/dev/diskname

But then, I realized that there wasn't (as far as I know) a file for infinite ones. Two questions... Is there either an alternative or a solution, and would the ones be necessary?

share|improve this question
    
Just want to mention that with modern drives, a wipe with random and then wipe with zeros is plenty. There's no reason to do a 7 pass, 5 pass, 3 pass. anti-forensics.com/disk-wiping-one-pass-is-enough –  Nathan Garabedian May 8 '12 at 17:54

3 Answers 3

up vote 5 down vote accepted

The file for endless ones is located in /usr/bin/yes 1 - you can often use the backtick character ` to execute that program in place, but you could also set up a named pipe if you really wanted a place to get ones.

Rather than use dd - you might have much better luck with a tool designed specifically for the task.

The level for secureErase can be 0-4 according to the man page and your taste for the number and types of overwrites.

share|improve this answer
1  
I didn't think about using yes. Thanks! –  CoffeeRain Apr 25 '12 at 15:32

You can use Disk Utility to write random data 1, 3 or 7 times to the disk. Just click on the disk you want to wipe, then Security Options. You'll be prompted with a dialogue to select the amount of rewrites you want to use: enter image description here

share|improve this answer

Disk Utility has an option to securely erase a hard drive using a standardized algorithm. Just navigate to the Erase panel and look for the button "Security Options...".

share|improve this answer

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.