Posted by Weston Ganger
June 07, 2014
Have you every rm'd a file or rm -r with some wildcard and deleted way too much. Well say goodbye to those headaches.
First download the trash-cli:
sudo apt-get install trash-cli
Then add a new alias in ~/.bash_aliases or whatever shell you use:
Now open a new tab, new terminal, or reload your shell put your new alias into effect.
Now whenever you use rm or rm -r it places the files in the Trash, not deleted forever, phew!
**NOTE: Does not work with sudo rm**