linux 中 md5sum -c 命令

发布时间 2023-10-17 21:22:34作者: 小鲨鱼2018

 

001\

[root@pc1 test01]# ls
[root@pc1 test01]# seq 3 > a.txt    ## 测试文件
[root@pc1 test01]# ls
a.txt
[root@pc1 test01]# cat a.txt
1
2
3
[root@pc1 test01]# md5sum a.txt > a.txt.md5      ## 生成md5码
[root@pc1 test01]# ls
a.txt  a.txt.md5
[root@pc1 test01]# cat a.txt.md5
c0710d6b4f15dfa88f600b0e6b624077  a.txt
[root@pc1 test01]# md5sum -c a.txt.md5          ## 对md5码进行check
a.txt: OK

.