Created
March 19, 2013 13:23
-
-
Save Apkawa/5196062 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HDD=$1 | |
BUFFER_SIZE=$(hdparm -i /dev/sda|grep -Po 'BuffSize=.*kB,'|sed -e 's/BuffSize=//' -e 's/kB,//') | |
echo "Start clean hdd $HDD" | |
CLEAN_CMD="dd if=/dev/random of=$HDD bs=${BUFFER_SIZE}kB" | |
for i in 1 2 | |
do | |
echo $CLEAN_CMD | |
$CLEAN_CMD | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment