Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to achieve rm /somepath/somefile to move it to Trash instead of deleting it.
rm /somepath/somefile
As well as rm -rf /somefolder and rm *.txt commands.
rm -rf /somefolder
rm *.txt
I found some utilities to make it
brew install trash
so now trash some_filecommand does it.
trash some_file
and
a lot of helpful stuff here