Shell脚本实现检测文件是否被修改过代码分享
(编辑:jimmy 日期: 2024/11/15 浏览:3 次 )
#!/bin/bash funmd5_1() { find /root/passwd -type f | xargs md5sum > /tmp/funmd5_1.log } funmd5_2() { find /root/passwd -type f | xargs md5sum > /tmp/funmd5_2.log } if [ ! -f /tmp/funmd5_1.log ];then funmd5_1 fi funmd5_2 diff /tmp/funmd5_1.log /tmp/funmd5_2.log > /tmp/diff.log Status=$"文件修改过了!" fi
下一篇:Shell脚本实现自动检测修改最快的Ubuntu软件源