-
Notifications
You must be signed in to change notification settings - Fork 416
Deekshith SN edited this page Jan 28, 2021
·
3 revisions
This command is used to delete files
Syntax
rm [options] file-list
| Option | Function |
|---|---|
| –interactive -i | Provides an interactive prompt before removing file. |
| –recursive -r | Deletes the contents of the specified directory, including all its subdirectories, and the directory itself |
| –verbose -v | Displays the name of each file as it is removed. |
| –force -f | Without asking for your consent, removes files for which you do not have write access permission. This option also suppresses informative messages if a file does not exist. |
Examples:-
- rm filename
- rm -rf filename
- rm * ( deletes all files in a given directory )
NOTE: While the options provided here work on most UNIX systems, some UNIX flavors may have changed their meanings or uses. If you experience an incompatibility with these options, please consult the manual page (see man command) on your system for a list of compatible options.
UNIX