rm
Unwanted files can clog up a hard disk and slowing it down, making file management chores unnecessarily complicated. rm is a good practice to regularly go by the subdirectories and remove the files which are not needed. This command is used to delete files which are no longer required.
Syntax
rm [option] (filename)
In the given syntax filename is the name of the file to be removed
Option can be one or any mixture of the following:
- f Forcefully removes a file even if it is write-protected
- i Interactively asks for confirming the deletion of the files
- r Removes a directory even if it is not blank
In the given example the file file2 in the newpersonal directory is removed.
# rm newpersonal/file2