Can anyone provide a Shell script such that if
a) if the person issues "rm -r *", the script will check if the current directory
is / or /var or /usr or /oracle (or any additional directories that I may add
from time to time), it will not echo out a message, you are about to execute
a dangerous delete from `pwd` & then come back to command prompt
b) if the person issues "rm *" or "rm *.*", it will do a confirmation, whether
to proceed besides echoing "Alert, you're in `pwd`, confirm to proceed? "
Any other way to prevent accidental deletion of files are welcome.
I'm concerned that if I replace the "rm" binary with the above "rm" script,
certain cron or jobs may fail