rm
File ManagementRemove files or directories
Options & Flags
Available options for this command
-rRemove directories and their contents recursively
-fForce removal without confirmation
-iPrompt before every removal
-vVerbose output
Examples
Common usage examples
Remove a file
rm file.txtRemove directory and all contents (use with caution!)
rm -rf directory/Remove all .txt files with confirmation
rm -i *.txtNotes
- Be extremely careful with 'rm -rf', it permanently deletes files
- Deleted files cannot be recovered easily