rm
Options
--force
,-f
-
rm-help-force
-i
-
rm-help-prompt-always
-I
-
rm-help-prompt-once
--interactive=<WHEN>
-
rm-help-interactive
--one-file-system
-
rm-help-one-file-system
--no-preserve-root
-
rm-help-no-preserve-root
--preserve-root
-
rm-help-preserve-root
--recursive
,-r
,-R
-
rm-help-recursive
--dir
,-d
-
rm-help-dir
--verbose
,-v
-
rm-help-verbose
--presume-input-tty
Examples
Remove specific files:
rm {{path/to/file1 path/to/file2 ...}}
Remove specific files ignoring nonexistent ones:
rm {{[-f|--force]}} {{path/to/file1 path/to/file2 ...}}
Remove specific files interactively prompting before each removal:
rm {{[-i|--interactive]}} {{path/to/file1 path/to/file2 ...}}
Remove specific files printing info about each removal:
rm {{[-v|--verbose]}} {{path/to/file1 path/to/file2 ...}}
Remove specific files and directories recursively:
rm {{[-r|--recursive]}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}
Remove empty directories (this is considered the safe method):
rm {{[-d|--dir]}} {{path/to/directory}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.