Files
oam/knowledge base/gnu userland/shred.md
2024-01-19 18:59:46 +01:00

1.2 KiB

shred

Overwrites devices or files in a way that helps prevent even extensive forensics from recovering the data.

  1. TL;DR
  2. Further readings
  3. Sources

TL;DR

# Pass on files more than 3 times.
shred -fn '10' 'path/to/file.1''path/to/file.N'
shred --force --iterations '10' 'path/to/file.1''path/to/file.N'

# Delete files and try hiding the shredding.
shred -uvz 'path/to/file.1''path/to/file.N'
shred --remove --verbose --zero 'path/to/file.1''path/to/file.N'

# Purge directories.
# `shred` does *not* accept directories as arguments.
find 'directory' -type f -exec shred -fu {} '+' \
&& find 'directory' -type d -empty -print -delete

Further readings

Sources

All the references in the further readings section, plus the following: