What does rm do?

remove files or directories.

▸ Explain your own rm command →

rm examples, explained

$ rm -rf build

  • rmremove files or directories
  • -rrecurse into directories (delete their contents)
  • -fforce — ignore missing files, never prompt
  • buildan argument passed to the command

$ rm -i note.txt

  • rmremove files or directories
  • -iprompt before every removal
  • note.txtan argument passed to the command

rm flags & options

-rrecurse into directories (delete their contents)
-fforce — ignore missing files, never prompt
-iprompt before every removal
-vverbose — explain what is being done
-dremove empty directories

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.