标签:
redhat/centos/suse
# md5sum /bin/bash c4a70cfbfc16e858a38069e72a74f39d /bin/bash # md5sum < /bin/bash c4a70cfbfc16e858a38069e72a74f39d -
aix
# csum /bin/sh fe6ffc66dca924caec57233521a48293 /bin/sh
solaris
# digest -a md5 /bin/bash 6a4967a62ecfcb42499b646ef5f8f0c5
如果未找到系统默认安装的特有命令,一般openssl是会有的。
# openssl md5 /bin/bash MD5(/bin/bash)= 6a4967a62ecfcb42499b646ef5f8f0c5 # openssl dgst -md5 /bin/bash MD5(/bin/bash)= 6a4967a62ecfcb42499b646ef5f8f0c5 # openssl md5 < /bin/bash 6a4967a62ecfcb42499b646ef5f8f0c5
批量取特定类型文件的md5值
find /lib -name *.so -type f -print0 | xargs -0 openssl md5 MD5(/lib/libnss_nisplus-2.5.so)= bf61ae355de7bd6313f65f0dc0308550 MD5(/lib/libdb-4.3.so)= 44e7d3c8a69c78c6e1615e38a039d1bf MD5(/lib/libanl-2.5.so)= 7b008b50a9726ad00f16f85082cd7ead MD5(/lib/libcidn-2.5.so)= fdf5ff2c3c580ac4f4e19a14ed68099a
标签:
原文地址:http://my.oschina.net/h2do/blog/494558