rm
Synopsis
Section titled “Synopsis”rm [-e [options] | -S | args...]Description
Section titled “Description”Enhanced rm that routes deletions through trash when safe. With no arguments, lists current trash contents. -e/--empty empties the trash (with optional trash-empty sub-arguments). -S/--secure permanently deletes via rm -rf and triggers fstrim. Plain paths and -r/-R are sent to trash put; any other flags fall back to system rm.
Opinionated component (C1): when disabled via __fish_config_op_aliases (or the __fish_config_opinionated master), behaves exactly like bare command rm — no wrapper, no trash, no trapping.
Arguments
Section titled “Arguments”(none) |
List current trash contents |
-e, --empty [opts] |
Empty the trash; opts forwarded to trash empty |
-S, --secure |
Permanently delete targets and run fstrim (irreversible) |
-r, -R, --recursive |
Forwarded to trash put alongside path arguments |
args... |
Files or paths to trash or remove |
Exit Status
Section titled “Exit Status”0 |
Operation succeeded |
1 |
trash put failed or file not found |
Falls back to /usr/bin/rm when trash is unavailable.
Example
Section titled “Example”rm file.txtrm -erm -S sensitive_key.pemDependencies: trash
Classification: bypasses-shadow(rm), destructive