0

under /usr/lib/ambari-metrics-get folder and /usr/lib/ambari-metrics-put we have jar files

/usr/lib/ambari-metrics-get/stax-api-1.0.1.jar
/usr/lib/ambari-metrics-get/stringtemplate-3.2.1.jar
/usr/lib/ambari-metrics-get/tephra-api-0.7.0.jar
/usr/lib/ambari-metrics-get/tephra-core-0.7.0.jar
/usr/lib/ambari-metrics-get/xmlenc-0.52.jar
/usr/lib/ambari-metrics-get/tephra-hbase-compat-1.1-0.7.0.jar
/usr/lib/ambari-metrics-get/tools-1.7.0.jar
/usr/lib/ambari-metrics-get/zkclient-0.9.jar
/usr/lib/ambari-metrics-get/twill-api-0.6.0-incubating.jar
/usr/lib/ambari-metrics-get/zookeeper-3.4.9.jar


/usr/lib/ambari-metrics-put/stax-api-1.0.1.jar
/usr/lib/ambari-metrics-put/stringtemplate-3.2.1.jar
/usr/lib/ambari-metrics-put/tephra-api-0.7.0.jar
/usr/lib/ambari-metrics-put/tephra-core-0.7.0.jar
/usr/lib/ambari-metrics-put/xmlenc-0.52.jar
/usr/lib/ambari-metrics-put/tephra-hbase-compat-1.1-0.7.0.jar
/usr/lib/ambari-metrics-put/tools-1.7.0.jar
/usr/lib/ambari-metrics-put/zkclient-0.9.jar
/usr/lib/ambari-metrics-put/twill-api-0.6.0-incubating.jar
/usr/lib/ambari-metrics-put/zookeeper-3.4.9.jar

what is the best approach to compare between folders?

the target is to find if chksum/md5 of all jars is equal to the other folder

note - in some case new jar files can be added to one of the folders so quantity of jar files can be diff between folders

meanwhile we are using

diff --brief --recursive /usr/lib/ambari-metrics-put /usr/lib/ambari-metrics-get
0
  • cd to /usr/lib/ambari-metrics-get/
  • md5sum *.jar >/tmp/jars.md5
  • cd to /usr/lib/ambari-metrics-put/
  • md5sum -c /tmp/jars.md5

Typically, use the folder with the most files as the first one (the one where you generate the MD5 list).

  • I mentioned my approach - diff --brief --recursive /usr/lib/ambari-metrics-put /usr/lib/ambari-metrics-get , why your suggestion is better from my ? – yael Feb 25 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.