Linux

No More Headaches From Rm The Wrong Files

Posted by Weston Ganger on 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:

alias rm=trash

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**


Posted in Linux and Tagged with rm linux 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts