Name
srm
Synopsis
srm [option]file
Securely removes files or directories by overwriting, renaming, and
truncating before unlinking. This prevents other users from
undeleting or recovering any information about the file from the
command line. srm
is the
brute force behind the Finder’s Secure Empty Trash
option.
srm
can’t
remove write-protected files owned by another user, regardless of the
permissions on the directory containing the file.
Options
-
-f,--force Ignore nonexistent files, and never prompt.
-
-i,--interactive Prompt before files are deleted.
-
-r,-R,--recursive Recursively remove the files of directories.
-
-s,--simple Delete the file, but only overwrite the file with a single pass.
-
-m,--medium Overwrite the file with seven U.S. Department of Defense-compliant passes (
0xF6,0x00,0xFF, random,0x00,0xFF, random).-
-z,--zero After overwriting, zero blocks used by file.
-
-n,--nounlink Overwrite the file, but don’t rename or unlink it.
-
-v,--verbose Display what is being done.
-
--help Display help file information for the
srmcommand.-
--version Display the version information for
srm.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access