Linux

No More Headaches From Rm The Wrong Files

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:

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 rmlinux

Recommended Posts

Contact

604-309-8713
info@solidfoundationwebdev.com

Westonganger profile

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.


Get Connected