Linux and Unix shred command
Quick links
About shred
Syntax
Examples
Related commands
Linux and Unix main page
Delete a file securely, first overwriting it to hide its contents.
shred [OPTIONS] FILE [...]
| -f, --force | Change permissions to allow writing if necessary. |
| -n, --iterations=N | Overwrite N times instead of the default (25) |
| -s, --size=N | shred this many bytes (suffixes like K, M, G accepted) |
| -u, --remove | truncate and remove file after overwriting |
| -v, --verbose | show progress |
| -x, --exact | do not round file sizes up to the next full block; this is the default for non-regular files |
| -z, --zero | add a final overwrite with zeros to hide shredding |
| - | shred standard output |
| --help | display this help and exit |
| --version | output version information and exit |
shred myfile.txt
Permanently deleted and makes the file myfile.txt unrecoverable (unless stored elsewhere or on a backup).
