O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 command.

--version

Display the version information for srm.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required