Skip to content

Instantly share code, notes, and snippets.

@webmaster128
Last active December 4, 2015 11:33
Show Gist options
  • Select an option

  • Save webmaster128/3f96cef287403ce82c04 to your computer and use it in GitHub Desktop.

Select an option

Save webmaster128/3f96cef287403ce82c04 to your computer and use it in GitHub Desktop.
Secure erase the fast way. Erases a HDD by encrypting zeros
PASS=$(cat /dev/urandom | tr -cd 0-9a-f | head -c 64) \
openssl enc -aes256 -pass env:PASS -iv $(cat /dev/urandom | tr -cd 0-9a-f | head -c 32) -in /dev/zero | sudo dd of=/dev/sdX bs=4096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment