Erasing your Hard Drive Data with Shred.

If you’re planning on selling or decommission your old PC / Laptop, it is always a good practice to completely erase your hard drive data. There are tools that make recovering of files very easy. Even when these files have been overwritten by partitioning and installing new OS. Tools like Shred or DBAN make the process of securely erasing your hard drive pretty easy and straight forward. For most folks using “dd” should work.

dd if=/dev/zero of=/dev/hda

The above command will write your entire drive with zero; however, if you’re not satisfied, you could use “Shred,” which is use by government agencies like DOD. When using Shred the default is to make 25 passes over the hard drive or files by writing random data, but for our scenario 25 passes seem overkill, so we just change the default to something like 5 or 10, and by adding the “-z” option we tell Shred to write the last pass with zeroes.

shred -vz -n 10 /dev/hda

When booting from a live cd you don’t need the “-f” option, which pretty much takes ownership of data in order to overwrite it, but since you’re already root, you don’t need that option. I though it would be good to clarify that since I’ve seen post in which people use the “-f ” option unnecessarily.

Share This!

Add a Comment

Your email address will not be published.

Sign up for our Newsletter

Download "Google Search Pro"

Enter your email and stay on top of things,