Shell脚本实现检测文件是否被修改过代码分享
2014-09-17 00:00
901 查看
#!/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
相关文章推荐
- Shell脚本实现检测文件是否被修改过代码分享
- Shell脚本实现复制文件到多台服务器的代码分享
- shell脚本中使用iconv实现批量文件转码的代码分享
- shell脚本实现拷贝大文件显示百分比的代码分享
- shell脚本实现拷贝大文件显示百分比的代码分享
- shell脚本中使用iconv实现批量文件转码的代码分享
- shell脚本实现拷贝大文件显示百分比的代码分享
- Shell脚本实现判断IP地址是否在一个ip段内代码分享
- Shell脚本实现判断IP地址是否在一个ip段内代码分享
- Shell脚本实现复制文件到多台服务器的代码分享
- 利用SHELL脚本实现文件完整性检测程序(1.2版更新)
- Shell脚本实现批量下载网络图片代码分享
- Shell脚本实现的阳历转农历代码分享
- Shell脚本实现批量下载网络图片代码分享
- Shell实现判断进程是否存在并重新启动脚本分享
- python脚本实现统计日志文件中的ip访问次数代码分享
- shell 脚本实现的遍历目录修改子目录及其文件权限
- Shell脚本读取ini配置文件的实现代码2例
- Shell脚本实现的阳历转农历代码分享