Copied from a Gist by dabrahams. It simply gives you a command-line alternative to rm
, but instead of a permanent deletion, it moves the file(s) to the Trash
.
The code is here. You can install it in usr/local/bin
, & afterwards sudo chmod a+rx trash
.