首页 > 代码库 > 快速遍历对比两个文件下的md5值

快速遍历对比两个文件下的md5值

[root@mail Activity]# find /opt/xyrpg/rpgserver_s1/XMLData/Activity/ -type f -exec md5sum {} \;|sed ‘s/rpgserver_s1/rpgserver_s2/‘|md5sum -c
/opt/xyrpg/rpgserver_s2/XMLData/Activity/ActivityCondition.xml: FAILED
/opt/xyrpg/rpgserver_s2/XMLData/Activity/NewServerActivity.xml: OK
/opt/xyrpg/rpgserver_s2/XMLData/Activity/huodong.xml: OK
md5sum: WARNING: 1 of 3 computed checksums did NOT match



跨机对比文件

[root@mail XMLData]# find /opt/xyrpg/rpgserver_s1/XMLData/ -type f -exec md5sum {} \;|ssh 192.168.1.250 "sed ‘s/rpgserver_s1/rpgserver_s22/‘|md5sum -c"


本文出自 “always_yunwei” 博客,请务必保留此出处http://alwaysyunwei.blog.51cto.com/3224143/1407786