如果没安装md5sum工具
yum install isomd5sum
检查文件是否被串改
#!/bin/bash
check_dir="/boot /etc /usr"
for i in $check_dir
do
find $i -type f -exec md5sum {} \; |sort > /server/md5$i.new
diff /server/md5$i.md5 /server/md5$i.new >> /server/log/md5.log
done
原文链接:https://www.f2er.com/centos/377371.html