Wednesday, January 5

lil' bit o' Bash to kill a hard drive via shred

Just a lil' something I wrote to clear hdds as I was doing lots at work...

no error checking or anything sensible like that, use at your own risk ;)

tim.bowers@timDesktop ~ $cat ./bin/kill_drive 
echo 'You wish to kill '$1'. Are you sure? (y/n)'
read consent
if [ $consent != "y" ]; then
echo 'Quitting'
sudo shred -v /dev/$1; xmessage -nearmouse Finished killing $1 &

No comments:

Search This Blog