Rm (unix) Article Index for
Rm
 

Information About

Rm (unix)




rm (short for '''r'''e'''m'''ove) 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.

  • ", and others) is frequently used in jokes and anecdotes about Unix disasters. The "rm -rf /" variant of the command, if run by an administrator, would cause the contents of every mounted disk on the computer to be deleted.


rm is often used in conjunction with Xargs to supply a list of files to delete: