手机
当前位置:查字典教程网 >脚本专栏 >linuxshell >Shell脚本实现检测文件是否被修改过代码分享
Shell脚本实现检测文件是否被修改过代码分享
摘要:#!/bin/bashfunmd5_1(){find/root/passwd-typef|xargsmd5sum>/tmp/funmd5_1...

#!/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脚本解压rpm软件包

shell编程之实现windows回收站功能分享

Shell脚本实现复制文件到多台服务器的代码分享

shell监控脚本 准备工作分享

Shell脚本批量修改文件后缀名代码分享

shell判断文件,目录是否存在或者具有权限的代码

Shell脚本实现在Linux系统中自动安装JDK

shell脚本中使用iconv实现批量文件转码的代码分享

判断文件是否存在的shell脚本代码

shell脚本实现ssh自动登录功能分享

精品推荐
分类导航