A simple tool to make rm a little more safe.
It puts files in the user's trash instead of deleting them immediately.
It is not a one-to-one drop in for rm and for now, only supports Darwin.
Note Linux support is a WIP and if you want to help, feel free to join me.
- Install Swift
- Clone this Repository
- Build the
Dustmanexecutable- If you have just installed, run
just build - Otherwise, just run
swift build -c release --product Dustman
- If you have just installed, run
- Copy the executable from
.build/release/Dustmanto a directory in your$PATH- On Darwin or Linux, this could be
/usr/local/binor~/.local/bin
- On Darwin or Linux, this could be
I would not recommend to alias rm to Dustman as the Dustman CLI is not flag-compatible to rm.
Therefore an alias could break some shell-scripts. Instead alias it to trash or just use it as Dustman.
Deleting files whose deletion would require root privileges is not supported,
because Dustman always reverts the UID to the user's own UID.
Otherwise, the deleted files would end up in the root's trash and therefore are not
recoverable by the user.
You're welcome to contribute to this project.
Licensed under the MIT License.
Build with ❤️ by Jan Fooken