Linux Commands Helper
💬 Your AI-powered Linux assistant
rm Command - Remove Files or Directories
The rm command is used to delete files and directories from the file system.
Syntax
rm [options] file...
Examples
rm file.txt
Remove file.txt.
rm -i file.txt
Remove file.txt with confirmation prompt.
rm -r dir
Recursively remove directory dir and its contents.
Notes
- Use rm with caution as deleted files cannot be easily recovered.
- Common options:
-i
(prompt before removal),-r
(recursive),-f
(force remove without prompt).