Skip to content

Instantly share code, notes, and snippets.

@pubkey
Last active October 8, 2016 09:57
Show Gist options
  • Save pubkey/7feed960b8d88f69412f5c2ad0a6a36f to your computer and use it in GitHub Desktop.
Save pubkey/7feed960b8d88f69412f5c2ad0a6a36f to your computer and use it in GitHub Desktop.
#show mounted drives
df -h
#overwrite drive with zeros
sudo dd if=/dev/zero of=/dev/xxx bs=1M
#regulary show state of last dd-command
watch -n5 'sudo kill -USR1 $(pgrep ^dd)'
#show unmounted drives
fdisk -l
# mount partition
mkfs -t vfat /dev/xxx
# mount full drive without partitions
mkfs.vfat -I /dev/xxx
#wipe free space:
#@link http://superuser.com/questions/19326/how-to-wipe-free-disk-space-in-linux
sudo apt-get install secure-delete
sfill -v .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment