nushell/docs/commands/rm.md
JT bff81f24aa
Autogenerate missing docs (#3514)
* Autogenerate missing docs

* Update ansi.md

* Rename question mark command docs

* Delete empty?.md
2021-05-30 12:57:04 +12:00

772 B

rm

Remove file(s).

Usage

> rm ...args {flags} 

Parameters

  • ...args: the file path(s) to remove

Flags

  • -h, --help: Display this help message
  • -t, --trash: use the platform's recycle bin instead of permanently deleting
  • -p, --permanent: don't use recycle bin, delete permanently
  • -r, --recursive: delete subdirectories recursively
  • -f, --force: suppress error when no file

Examples

Delete or move a file to the system trash (depending on 'rm_always_trash' config option)

> rm file.txt

Move a file to the system trash

> rm --trash file.txt

Delete a file permanently

> rm --permanent file.txt

Delete a file, and suppress errors if no file is found

> rm --force file.txt