例子:
find /var/log -type f|xargs md5sum > md5list.txt #递归log下的文件的md5值输出重定向到md5list.txt文件中#使用md5sum校验[root@test test]# md5sum -c md5list.txt/var/log/tallylog: OK/var/log/lastlog: OK/var/log/wtmp: OK......
2、使用wc -l来统计文件数量
例子:
[root@test test]# find /var/log -type f |wc -l241
web环境之安全小脚本
原文地址:http://blog.51cto.com/19940428/2068971