我想观看文件xyz.txt的任何更改,并在发生更改时通过电子邮件发送给我整个文件.是否有一个衬里(或几行
shell脚本)?
更新:
# Check if my.cnf has been changed in the last 24 hours # if yes,as in the following case,simply send the file # if it has not been changed in the last 24 hours,do nothing. # find /etc/ -name my.cnf -mtime 0 /etc/my.cnf # cat /etc/my.cnf | mail shantanu@company.com
现在,如果有人可以展示如何在shell脚本或1命令中绑定这两行.