Show HN: rm-safely – A shell alias that moves files to trash instead of deleting
6 days ago
- #macos
- #file-management
- #shell-safety
- rm-safely is a shell alias to prevent accidental deletion of important files on MacOS.
- It saves deleted files in ~/.local/share/Trash, persisting across reboots.
- Install via curl or Homebrew: `curl -fsSL [URL] | bash -s install` or `brew install zdk/tools/rm-safely`.
- Use `rm` as usual; files are moved to Trash first for safety.
- Override with `rm --rm` to delete immediately or use `/bin/rm` directly.
- Additional commands: `--list-trash`, `--empty-trash`, `--show-trash-path`.
- Uninstall with: `curl -fsSL [URL] | bash -s uninstall`.