I want to send an email when someone runs specific command on linux like cp (copy) or rm(remove) command.Can anybody tell me how it is possible ?
Asked
Active
Viewed 82 times
0
-
Yes i am trying to achieve this. if you have any idea how i can do give me an idea then i will do – Mian Anjum Mar 09 '16 at 13:30
1 Answers
2
You can use aliases: Creating permanent executable aliases
For example you can add in your ~/.bashrc :
alias rm='my_script.sh'
where my_script.sh
is a script which can send an email.