如果没安装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
时间: 2024-11-05 16:25:29