Restrict "rm -rf *" command in Linux/Unix ?
Posted on 2009-05-06
Can anyone suggest me how to restrict the "rm -rf *" command.
I want to restrict some users accidently typing the "rm -rf *" command from a login at unintended directory. (Say if i want to delete log files in log directory and uses "rm -rf *" command and later found out that i was in HOME ?????)
I tried <<alias rm "rm -i">>. The above command interactively asks me before deleting.
But the problem comes when the -f option is used. It overrides others and just deletes.
Just needs to know, how i can restrict this command.
Thanks for your valuable suggestions...