github twitter
Securely erasing HDDs
Aug 9, 2014
One minute read

Find the device name

lsblk

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

screenshot

fdisk

sudo fdisk -l

screenshot

Overwrite the data on the HDD

shred

shred -vfz -n 2 /dev/sdX

This command forces shred to overwrite the entire disk with zeros two times.

dd

Overwriting the disk with zeros:

dd if=/dev/zero of=/dev/sdX iflag=nocache oflag=direct bs=4096

Overwriting the disk with random data:

dd if=/dev/urandom of=/dev/sdX bs=4096

Resources


Back to posts


comments powered by Disqus