当某人在linux上运行诸如cp(copy)或rm(remove)命令之类的特定命令时,我想发送电子邮件。有人可以告诉我这怎么可能吗?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.