shred
shred overwrites devices or files, to help prevent even extensive forensics from recovering the data.[1]
- GNU Coreutils [EN] @ Fedora Package
- GNU Coreutils [EN] @ Homebrew Formula
Documentation
- shred [EN] @ GNU Coreutils Manual
- man 1 'shred' [EN]
Syntax
shred [PARAMETER ...] [FILE/DEVICE ...]
Parameters
- -f, --force
- Override file permissions if necessary to allow overwriting.
- -n NUMBER, --iterations=NUMBER
- By default, shred uses 3 passes of overwrite. You can reduce this to save time, or increase it if you think it’s appropriate. After 25 passes all of the internal overwrite patterns will have been used at least once.
- --random-source=FILE
- Use FILE as a source of random data used to overwrite and to choose pass ordering.
- -v, --verbose
- Display to standard error all status updates as sterilization proceeds.
- -z, --zero
- Normally, the last pass that shred writes is made up of random data. If this would be conspicuous on your storage device (for example, because it looks like encrypted data), or you just think it’s tidier, the --zero option adds an additional overwrite pass with all zero bits. This is in addition to the number of passes specified by the --iterations option.
Examples
- Delete all data from a hard drive
shred --force --iterations=2 --verbose --zero '/dev/sda'