有时候需要比较一下文件数据是否相同,用命令行可以快速实现。
Windows
MD5
certutil -hashfile <target-file-path> MD5
SHA1
certutil -hashfile <target-file-path> SHA1
SHA256
certutil -hashfile <target-file-path> SHA256
SHA512
certutil -hashfile <target-file-path> SHA512
Linux
MD5
md5sum <target-file-path>
SHA1
sha1sum <target-file-path>
SHA256
sha256sum <target-file-path>
SHA512
sha512sum <target-file-path>