Linux: Securely Erase A Hard Drive
shred -vfz -n 100 /dev/hda
Here’s what this does. “shred” is the command that tells the operating system that you want to not only erase all the files on the drive but also to over-write those files with random bits. The “f” in the “-vfz” command forces the write by changing the permissions on the drive wherever necessary. The “z” in the “-vfz” command writes zeros to the drive. The “-n” command is followed by a number (“100″ in the example above). This tells the operating system how many times to write random data to the drive. The more times you write over the data you had on the drive, the lower the odds that someone will be able to recover your files. Writing over your data 100 times is likely overkill; 3 to 5 times is how many times I typically wrote over data using Eraser (which does the same thing). Finally, the “/dev/hda” portion of the command tells the computer which drive to wipe.
By: Ryan