CSC373/406: linux: rm: Delete Files/Directories [19/42] Previous pageContentsNext page

Command: rm

Arguments: file list

Options: -i -r

Description: Removes (deletes) the specified files

-i   Ask before removing each file (Good idea since it is not possible to reverse a removal)
-r   Recursively remove directories and subdirectories in
     the list. Files will be removed in these directories
     first and then the directory itself. (Useful but dangerous)]]

Example:

$ rm test.txt 
$ rm -r test

Previous pageContentsNext page