linux 中 shasum命令

 

001、

[root@PC1 test4]# ls
a.txt
[root@PC1 test4]# shasum a.txt
8b945928bcfa1a6018f3e65d83ad27c6879bd6c8  a.txt
[root@PC1 test4]# shasum --algorithm 256 a.txt
728c991fa4a6278284a98a4ce5e9021c4a847029c318c14899e9f0fb1107c15e  a.txt
[root@PC1 test4]# shasum -a 256 a.txt
728c991fa4a6278284a98a4ce5e9021c4a847029c318c14899e9f0fb1107c15e  a.txt
[root@PC1 test4]# shasum --algorithm 512 a.txt
1795983c6e622b11fe1a9103869c0a861b36dabdfdb64e8429fa5c8a301bf58b65a33e43a3a16f706f1afe5ebe4268826d50905e83a9e6f00ccf415e7771844b  a.txt
[root@PC1 test4]# shasum -a 512 a.txt
1795983c6e622b11fe1a9103869c0a861b36dabdfdb64e8429fa5c8a301bf58b65a33e43a3a16f706f1afe5ebe4268826d50905e83a9e6f00ccf415e7771844b  a.txt
[root@PC1 test4]# shasum a.txt > xx
[root@PC1 test4]# shasum --check xx
a.txt: OK
[root@PC1 test4]# shasum -a 256 a.txt > yy
[root@PC1 test4]# ls
a.txt  xx  yy
[root@PC1 test4]# shasum --check yy
a.txt: OK
[root@PC1 test4]# cat a.txt | shasum
8b945928bcfa1a6018f3e65d83ad27c6879bd6c8  -
posted @ 2022-08-07 23:50  小鲨鱼2018  阅读(744)  评论(0编辑  收藏  举报