Overwrite a file to make recovery harder
high risk
ls -l <file>Confirm the target firstcryptsetup luksErase <device>For disks: use encryption + crypto-eraseOverwrites a file multiple times, optionally deleting it (-u).
| Flag | Meaning |
|---|---|
-u | Remove the file afterwards |
-n | Number of overwrite passes |
-z | Add a final pass of zeros |
-v | Show progress |
shred -vzu secret.txtOverwrite and delete · explain & risk-check →Reference text is hand-written and may be incomplete — check man shred for your version. Test destructive commands on a non-production system first.