rm replacement with undo/restore via a per-user trash.
resrm file1 file2
resrm -r mydir
resrm -l
resrm --inspect <id|name>
resrm --restore <id|name>
resrm --empty
resrm --skip-trash file # permanent delete
-l and --inspect to find the item you want.rm to resrm you will barely see the difference.Everything for this tool on one page: options, behaviour notes, and copy-paste examples.
resrm -l
Shows full details (original path, timestamps, etc.).
resrm --inspect <id|name>
resrm --restore <id|name>
You can restore by short ID or exact basename.
To use resrm with sudo, root must be able to find it in $PATH. Either install as root,
or add your user’s bin directory to secure_path in /etc/sudoers.
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/user/.local/bin"
If you install via the GuardUtils APT/DNF repository, sudo works out of the box.
~/.local/share/resrm/files/root/.local/share/resrm/filesEntries older than RESRM_TRASH_LIFE days are pruned automatically (default 7, minimum 1).
export RESRM_TRASH_LIFE=10
resrm --empty
# Move files to trash
resrm file1 file2
# Recursive remove of a directory
resrm -r mydir
resrm -f file # ignore nonexistent
resrm -i file # interactive
By default resrm is undoable. For immediate deletion, opt in explicitly:
resrm --skip-trash file