MD5sum 指纹对比。
root@127:~/pythonstdy/2017-02-26/test# md5sum file1 file2 >f1f2 root@127:~/pythonstdy/2017-02-26/test# md5sum --check f1f2 file1: OK file2: OK root@127:~/pythonstdy/2017-02-26/test# echo "1">>file1 root@127:~/pythonstdy/2017-02-26/test# md5sum --check f1f2 file1: FAILED file2: OK
从上可以看出当文件被改变的时候,对比就报错。说明文件被篡改。