Linux Today: Linux News On Internet Time.

LinuxGazette: Securely Erasing a Hard Drive with Perl

Feb 18, 2001, 22:00 (5 Talkback[s])
(Other stories by Mark Nielsen)

"When moving from Ohio to California, GNUJobs.com had some hard drives (along with other hardware and software) which were to be donated to COLUG (Central Ohio Linux Users Group). They needed to be deleted before they were donated. 2 out of the 3 hard drives had bad sectors on them, and the third I ended up using as a hard drive for testing purposes, like creating this article, so I ended up not giving any away. Still, I will need to wipe a hard drive in the future, so I created this Perl script (which I will later convert to Python and make it have more options)."

"The goal of this Perl script is to just delete the hard drive at /dev/hdb (the slave drive on the Primary IDE controller) since I have a hard drive removeable kit there. I want it to delete all partitions, create one partition that takes up the whole hard drive, and then fill up the hard drive with garbage data (including some random encrypted data just to ruin a hacker's day trying to find out what the data is)."

Complete Story

Related Stories: