$rm
Remove files or directories from the filesystem.
rm [OPTIONS] FILE...Live im interaktiven Terminal ausprobieren
Client-seitige Simulation ohne Installation mit sofortigem Feedback.
Überblick & Funktionsweise
`rm` (Remove) deletes files and directories. Linux filesystems do not have a "Recycle Bin" or "Trash" for CLI commands—once a file is removed with `rm`, its data blocks are unlinked immediately. Combining `-r` (recursive) and `-f` (force) allows removing non-empty directory trees.
Wichtige Optionen und Flags
| Flag / Option | Description |
|---|---|
| -r, -R | Remove directories and their contents recursively. |
| -f | Force removal without prompting for confirmation or reporting non-existent files. |
| -i | Prompt interactively before every file removal. |
| -v | Verbose mode explaining what is being deleted. |
Praktische Anwendungsbeispiele
rm /home/user/notes.txt && ls -lDeletes notes.txt and verifies the directory listing.
rm -rf /tmp/test_dirForces recursive removal of the test directory without confirmation prompts.
Verwandte Linux-Befehle
Durchsuchen Sie Verzeichnishierarchien nach Dateien basierend auf Name, Typ, Größe oder Änderungsdatum.
Dateiinhalte verketten und auf der Standardausgabe ausgeben.
Create new directories and folder hierarchies.
Copy files and directories to a destination path.
Move or rename files and directories.
Create empty files or update file access and modification timestamps.