[root@localhost 4]# echo "123" >test.zip

生成sha256文件校验文件
[root@localhost 4]# sha256sum test.zip >test.zip.sha256sum

使用sha256sum校验文件一致性
[root@localhost 4]# sha256sum -c <(grep test.zip test.zip.sha256sum)
test.zip: OK                                 //表示两文件一致

[root@localhost 4]# echo "345" >>test.zip

[root@localhost 4]# sha256sum -c <(grep test.zip test.zip.sha256sum)
test.zip: FAILED
sha256sum: WARNING: 1 of 1 computed checksum did NOT match
//文件不一致

 

相关文章:

  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-07-06
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2021-09-11
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案