Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Erase free disk space from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Erase free disk space from the command line
Authored by: ikioi on Apr 24, '08 09:53:20AM

"Wouldn't you be much better off using /dev/random instead?"

No, that would actually be terrible. First of all, you shouldn't fill the boot disk of a running machine because it will cause problems, so the hint is a bad idea anyway. However, if you are anxious to do bad stuff like fill your root drive, then you definitely shouldn't do it from /dev/random, because /dev/random requires vastly more CPU power to generate data for than /dev/zero does. If would take few hours to fill a drive from /dev/zero, but it could take a few weeks to fill it from /dev/random.

Also, I don't know if Mac OS X does this, but Linux will sometimes block on reads from /dev/random while it waits for more genuinely random input from the outside world (say mouse movements, or network traffic rates or some such). (This used to cause "depleted entropy pool" problems for ssl and ssh on linux. Sorry for the "in my day" storry, but I remember when I used to use linux to generate SSH keys and I would have to wiggle my mouse around a lot in order to generate ssh keys in a reasonable amount of time. :-)

[ Reply to This | # ]
Erase free disk space from the command line
Authored by: operator207 on Apr 25, '08 02:35:13PM

Yes, I remember when I setup a FreeBSD server ~5 years ago, I got the standard generating key message you would normally get, then something odd telling me to "wiggle my mouse or hit keys on the keyboard". You feel like an idiot standing at a console in the server room, "wiggling the mouse", and banging on the keyboard, with other admins* walking around asking you if you have gone insane.

Its funny now, not so much back then.

* They were Windows admins, I was the *nix admin at that time.

[ Reply to This | # ]