rm [options] file...Arguments explained
- file is the path to remove.
- -r removes directories recursively.
- -i asks before each removal.
- -f ignores nonexistent files and suppresses prompts.
Common examples
rm old-notes.txtDeletes the file from the current directory.
rm -ri old-projectRecursively removes a directory while asking for confirmation.
| Field | Details |
|---|---|
| Command | rm |
| Category | File and Folder Operations |
| Primary use | Removes files or directory trees. |
| Syntax | rm [options] file... |