diff --git a/pages/common/rm.md b/pages/common/rm.md index 6201bf012..da1b9ca8e 100644 --- a/pages/common/rm.md +++ b/pages/common/rm.md @@ -1,24 +1,25 @@ # rm > Remove files or directories. +> See also: `rmdir`. > More information: . -- Remove files from arbitrary locations: +- Remove specific files: -`rm {{path/to/file}} {{path/to/another/file}}` +`rm {{path/to/file1 path/to/file2 ...}}` -- Recursively remove a directory and all its subdirectories: +- Remove specific files ignoring nonexistent ones: -`rm -r {{path/to/directory}}` +`rm -f {{path/to/file1 path/to/file2 ...}}` -- Forcibly remove a directory, without prompting for confirmation or showing error messages: - -`rm -rf {{path/to/directory}}` - -- Interactively remove multiple files, with a prompt before every removal: +- Remove specific files [i]nteractively prompting before each removal: `rm -i {{path/to/file1 path/to/file2 ...}}` -- Remove files in verbose mode, printing a message for each removed file: +- Remove specific files printing info about each removal: -`rm -v {{path/to/directory/*}}` +`rm -v {{path/to/file1 path/to/file2 ...}}` + +- Remove specific files and directories [r]ecursively: + +`rm -r {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` diff --git a/pages/linux/rm.md b/pages/linux/rm.md new file mode 100644 index 000000000..784999769 --- /dev/null +++ b/pages/linux/rm.md @@ -0,0 +1,25 @@ +# rm + +> Remove files or directories. +> See also: `rmdir`. +> More information: . + +- Remove specific files: + +`rm {{path/to/file1 path/to/file2 ...}}` + +- Remove specific files ignoring nonexistent ones: + +`rm --force {{path/to/file1 path/to/file2 ...}}` + +- Remove specific files interactively prompting before each removal: + +`rm --interactive {{path/to/file1 path/to/file2 ...}}` + +- Remove specific files printing info about each removal: + +`rm --verbose {{path/to/file1 path/to/file2 ...}}` + +- Remove specific files and directories recursively: + +`rm --recursive {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`