Mac: Command: MD5 & SHA1 & CRC-32 checksum

来源:互联网 发布:linux 网络调试工具 编辑:程序博客网 时间:2024/06/14 16:03

open the command terminal

MD5 checksum command: to get the MD5 hash of a file

md5 /path/to/file
eg:

$ md5 ~/Desktop/abc.dmg

SHA1 checksum command:

shasum /path/to/file
eg:

$ shasum ~/Desktop/abc.dmg

CRC-32 checksum command:

  1. crc32 /path/to/file: to get the hexadecimal CRC32 checksum of a file
    eg:

    $ crc32 bcd.dmg=> dc18facfc
  2. cksum -o3 /path/to/file: to get the decimal CRC32 checksum of a file, where -o3(oh 3) refers to the 3rd algorithm used or the “32bit CRC” algorithm
    eg:

    $ cksum bcd.dmg=> 4587238905 89 bcd.dmg(decimal cksum | file size in bytes | filename)
0 0
原创粉丝点击