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
srm
-
--version
Display the version information for
srm
.
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.