scrub overwrites files, disks, and other devices with repeating patterns to make recovery harder. The same SSD/COW caveats as shred apply.
scrub file.txt # default pattern (nnsa)
scrub -p dod file.txt # US DoD 5220.22-M style 3-pass pattern
scrub -p fillzero /dev/sdX # single zero-fill pass over a whole disk (DESTRUCTIVE)
scrub -p list # list available patterns
Erase a disk on a remote machine without losing the job¶
A whole-disk scrub takes hours. Run it inside screen or tmux so an SSH drop does not kill it:
ssh host
sudo -s
screen -S scrub
scrub -p dod /dev/sdX
# detach with Ctrl+a d, log out, later: ssh host; sudo screen -r scrub
Check the device name with lsblk before you start.