Unix Command - rm (short for remove)



rm is a Unix command used to delete files from a filesystem. Common options that rm accepts include:

-r, which processes subdirectories recursively
-i, which asks for every deletion to be confirmed
-f, which ignores non-existent files and overrides any confirmation prompts ("force")

rm is often aliased to "rm -i" so as to avoid accidental deletion of files. If a user still wishes to delete a large number of files without confirmation, they can manually cancel out the -i argument by adding the -f option.

$ rm public/html/hello.html
$ rm temp.txt