I intended to delete all the backup files in a directory, so I was going to type rm *~ in the terminal. Unfortunately, I hit the Enter before hitting the tilde and unhappy things happened. Although, I've recovered all deleted files I really don't want it to happen again. Could I forbid the execution of such a command unless being granted a permission, like that of a superuser?
how to forbid a command without a permission
command line;command;user interface
I am not a fan of overriding built-in commands, but in my .bashrc (part of Tilde, my dot files) I explicitly do this:alias rm='rm -i';This makes rm ask for permission before deleting. It has saved me a few times. You can always override with rm -f.