The rm command deletes files in a directory
The rm command will usually not produce an output unless you have made an error.
There is no "undelete" command in UNIX, once you delete a file, it is gone (unless it is on a backup tape).
Because of this, the rm command on CMGM and PMGM will ask you if you really want to delete a file before it goes ahead and does it.
Most UNIX commands have a variety of additional command modifiers that can be used to change the output. For example, if you typed
rm -r *
you would delete recursively the contents of a directory. This means the contents of a directory and all directories and files under it.
Other popular rm commands include
|
What to Type |
What it Does |
|
|
delete everything in a subdirectory |
|
|
remove only files with a .txt on the end |
|
|
remove only files that start with the word "data" |
|
|
removes everything in the subdirectory "dir2" |
For more help with the rm command or to see the online UNIX manual and all the extensions to the rm command, click here.