Is there a way to prevent deletion of system/shell aliased folders? I want these commands to fail. My shell is bash.Such as:  $rm -rf .$rm -rf ..$rm -rf ~$rm -rf *
Preventing deletion of system/shell aliased folders
bash;rm
Note that ~ and * are expanded by the shell before passing the arguments to rm.The only way to do it is to define a function named rm that parses the arguments before invoking command rm ...I would not recommend it. When you get lazy, you get in trouble when you sit at some other computer without your self-protections. I used to alias rm=rm -i before that bit me.