junjie 通过本文主要向大家介绍了shell脚本读取文件,shell脚本创建文件,shell脚本写文件,shell脚本打开文件,shell脚本 遍历文件等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
#!/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=$?
if [ $Status = 0 ];then
exit
else
echo "文件修改过了!"
fi
</div>
</div>

