rm

From Mac Guides

Jump to: navigation, search

rm is a Terminal command used to delete files or folders.

Examples

To delete a file called "Test.txt" in your home folder:

 rm ~/Test.txt

To delete a folder called "Test" in your home folder:

 rm -r ~/Test/

Man Page Excerpt

The rm utility attempts to remove the non-directory type files specified on the command line. If the permissions of the file do not permit writing, and the standard input device is a terminal, the user is prompted (on the standard error output) for confirmation.