2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: rm
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Remove file(s).
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> rm ...rest --trash --permanent --recursive --force --quiet```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Parameters
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `...rest`: the file path(s) to remove
|
|
|
|
- `--trash`: use the platform's recycle bin instead of permanently deleting
|
|
|
|
- `--permanent`: don't use recycle bin, delete permanently
|
|
|
|
- `--recursive`: delete subdirectories recursively
|
|
|
|
- `--force`: suppress error when no file
|
|
|
|
- `--quiet`: supress output showing files deleted
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-20 01:13:33 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Delete or move a file to the system trash (depending on 'rm_always_trash' config option)
|
|
|
|
```shell
|
|
|
|
> rm file.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Move a file to the system trash
|
|
|
|
```shell
|
|
|
|
> rm --trash file.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Delete a file permanently
|
|
|
|
```shell
|
|
|
|
> rm --permanent file.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Delete a file, and suppress errors if no file is found
|
|
|
|
```shell
|
|
|
|
> rm --force file.txt
|
|
|
|
```
|
|
|
|
|