利用openssl提取文件的校验码并检测文件是否是一致的
[codesyntax lang=”text”]
[root@NFS-Server test]# openssl dgst -md5 1.txt MD5(1.txt)= a79442abd5338d7c47c7cd03898d1431 [root@NFS-Server test]# echo "123" >>1.txt [root@NFS-Server test]# tail -1 1.txt 123 [root@NFS-Server test]# openssl dgst -md5 1.txt MD5(1.txt)= 322e54a962fe9d3f1d091610b7fc19ec
[/codesyntax]
提示:我们可以利用此功能来监控一些系统的关键文件或者是监控网站的程序文件,是否被非法篡改过
openssl之文件校验