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 
#!/bin/bash
echo 'You wish to kill '$1'. Are you sure? (y/n)'
read consent
if [ $consent != "y" ]; then
echo 'Quitting'
exit
fi
sudo shred -v /dev/$1; xmessage -nearmouse Finished killing $1 &
exit

Post a Comment

Search This Blog