rm
Linux · Files · available in the simulator
What it does
Remove files or directories (including non-empty ones with -R).
Syntax
rm [opciones] archivo...
Options and parameters
-RRemove directories and their contents recursively.
-iPrompt before every removal.
-fIgnore nonexistent files and arguments, never prompt.
rm -rf carpeta-vExplain what is being done (display each removed file).
-rRemove directories and their contents recursively.
rm -r carpeta-IPrompt once before removing more than three files.
-dRemove empty directories.
--preserve-rootDo not remove '/' recursively; enabled by default.
Usage examples
rm errorrm -R linuxrm -i *.txtrm archivo.txtrm -rf build/rm -r carpetarm -rf carpeta
Notes and common mistakes
- rm -rf does not use a trash bin: on a real system, deletion is permanent.