rm: add/refresh pages (#7994)

* Add `rm` page copy with long options

* Refresh title

* Refresh pages:
- better grammar/syntax
- `See also` links
- reorder examples

* Use imperative mood in titles

* Don't use brace expansion

* Use `and` instead of `/` for `-r` examples

Co-authored-by: Axel Navarro <navarroaxel@gmail.com>

Co-authored-by: Axel Navarro <navarroaxel@gmail.com>
pull/3/head
Emily Grace Seville 2023-01-08 01:31:17 +10:00 committed by GitHub
parent b3bd91d502
commit 6cf81f993a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 11 deletions

View File

@ -1,24 +1,25 @@
# rm
> Remove files or directories.
> See also: `rmdir`.
> More information: <https://www.gnu.org/software/coreutils/rm>.
- 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 ...}}`

25
pages/linux/rm.md Normal file
View File

@ -0,0 +1,25 @@
# rm
> Remove files or directories.
> See also: `rmdir`.
> More information: <https://www.gnu.org/software/coreutils/rm>.
- 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 ...}}`