linux md5sum 生成文件的md5摘要信息并进行检验
【摘要】 ECS信息规格:2vCPUs | 4GiB | kc1.large.2镜像:openEuler 20.03 64bit with ARM | 公共镜像 linux md5sum 生成文件的md5摘要信息并进行检验 md5sum 校验单个文件# md5sum tcpdump-4.9.3-3.oe1.aarch64.rpm 5b65056852872b29c577f4ddc1014ac2 ...
ECS信息
- 规格:2vCPUs | 4GiB | kc1.large.2
- 镜像:openEuler 20.03 64bit with ARM | 公共镜像
linux md5sum 生成文件的md5摘要信息并进行检验
md5sum 校验单个文件
# md5sum tcpdump-4.9.3-3.oe1.aarch64.rpm
5b65056852872b29c577f4ddc1014ac2 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum tcpdump-4.9.3-3.oe1.aarch64.rpm > tcpdump-4.9.3-3.oe1.aarch64.rpm.md5
# cat tcpdump-4.9.3-3.oe1.aarch64.rpm.md5
5b65056852872b29c577f4ddc1014ac2 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum -c tcpdump-4.9.3-3.oe1.aarch64.rpm.md5
tcpdump-4.9.3-3.oe1.aarch64.rpm: OK
md5校验多个文件
# ll | grep rpm
-rw------- 1 root root 50K Mar 26 2020 CUnit-2.1.3-21.oe1.aarch64.rpm
-rw------- 1 root root 387K Mar 26 2020 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum *.rpm > rpm.md5
# cat rpm.md5
b9d82dfd5150f3074161378f17559228 CUnit-2.1.3-21.oe1.aarch64.rpm
5b65056852872b29c577f4ddc1014ac2 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum -c rpm.md5
CUnit-2.1.3-21.oe1.aarch64.rpm: OK
tcpdump-4.9.3-3.oe1.aarch64.rpm: OK
grep -v 过滤掉相关OK的内容,只剩下出现问题的部分
# cat rpm.md5
b9d82dfd5150f3074161378f17559228 CUnit-2.1.3-21.oe1.aarch64.rpm
5b65056852872b29c577f4ddc1014ac2 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum --check rpm.md5 | grep -v OK
# vim rpm.md5
# cat rpm.md5
b9d82dfd5150f3074161378f17559228 CUnit-2.1.3-21.oe1.aarch64.rpm
aaaaaaaaaaaaab29c577f4ddc1014ac2 tcpdump-4.9.3-3.oe1.aarch64.rpm
# md5sum --check rpm.md5
CUnit-2.1.3-21.oe1.aarch64.rpm: OK
tcpdump-4.9.3-3.oe1.aarch64.rpm: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
# md5sum --check rpm.md5 | grep -v OK
md5sum: tcpdump-4.9.3-3.oe1.aarch64.rpm: FAILED
WARNING: 1 computed checksum did NOT match
学习资料
欢迎各位同学一起来交流学习心得^_^
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)