I accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I went on to rm -rv ~/etc, but I quickly typed rm -rv /etc instead, and hit enter, while using a root account.

  • Sylveon@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 day ago

    I think this is the best approach. I’ve created a short alias for my trash tool and also aliased rm to do nothing except print a warning. This way you train yourself to avoid using it. And if I really need it for some reason I can just type \rm.

    If you want to train yourself even more effectively you can also alias rm to run sl instead :)