Securely wipe a disk

One-pass overwrite with zeros + verify (use hdparm ATA for NVMe)

shred -vzn 1 /dev/sdb

tool
linux133 commands
tags
linuxdisksecurity

More linux commands

  • smartctl -a /dev/sda | grep -E 'SMART overall|Reallocated|Pending|Uncorrectable'

    SMART overall health and key failure indicators

  • dd if=/dev/zero of=/tmp/testfile bs=1M count=1024 conv=fdatasync

    Write 1GB with forced sync to measure raw write speed

  • lsns -t net,pid,mnt

    List Linux namespaces for network, PID, and mount isolation

  • systemd-cgls

    Tree view of systemd cgroup hierarchy and resource assignments

  • find /var/log -name '*.log' -exec wc -l {} + | sort -rn | head -20

    Find the biggest log files by line count

all 133 linux commands