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 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts