trash is command-line tool for macOS, written in Swift, that moves files to the current user's trash folder.
It is compatible with the macOS
rm command, so you can alias the later, and no longer worry about permanently deleting your precious files.
trash can be installed with Homebrew:
brew install --HEAD macmade/tap/trash
You can alias the default
rm command to
trash, using the following line into your shell profile file:
if [ -f /usr/local/bin/trash ]; then alias rm="/usr/local/bin/trash"; fi
trash is released under the terms of the MIT license.
Owner: Jean-David Gadina - XS-Labs Web: www.xs-labs.com Blog: www.noxeos.com Twitter: @macmade GitHub: github.com/macmade LinkedIn: ch.linkedin.com/in/macmade/ StackOverflow: stackoverflow.com/users/182676/macmade