- osx - How to move files to trash from command line? - Ask Different
- morgant/tools-osx: A small collection of command line tools for Mac OS X, incl.: clipcat, dict, eject, ql, swuser, trash & with.
e.g.:
osascript -e 'tell app "Finder" to move the POSIX file "/Users/matty/ssl/www.ccr.az.2016-06-06.bad.tar.gz" to trash'