Windows equivalent of linux cksum command

2019-01-22 11:23发布

I am looking for a way to compute crc checksum cross platform.

cksum works on Linux, AIX, HP-UX Itanium, Solaris, is there a equivalent command of linux cksum in windows too?

%cksum run.sh
1491301976 652 run.sh

Note: no third party tool

4条回答
闹够了就滚
2楼-- · 2019-01-22 11:40

To avoid annoying non-checksum lines : CertUtil -v -hashfile "your_file" SHA1 | FIND /V "CertUtil" This will display only line(s) NOT contaning CertUtil

查看更多
爷的心禁止访问
3楼-- · 2019-01-22 11:49

Here is a C# implementation of the *nix cksum command line utility for windows https://cksum.codeplex.com/

查看更多
Emotional °昔
4楼-- · 2019-01-22 11:52

In Windows (command prompt) you can use CertUtil, here is the syntax:

CertUtil [Options] -hashfile InFile [HashAlgorithm]

for syntax explanation type in cmd:

CertUtil -hashfile -?

example:

CertUtil -hashfile C:\myFile.txt MD5

default is SHA1 it supports: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512. Unfortunately no CRC32 as Unix shell does.

Here is a link if you want to find out more https://technet.microsoft.com/en-us/library/cc732443.aspx#BKMK_menu

查看更多
Evening l夕情丶
5楼-- · 2019-01-22 12:04

It looks as if there is an unsupported tool for checksums from MS. It's light on features but appears to do what you're asking for. It was published in August of 2012. It's called "Microsoft File Checksum Integrity Verifier".

http://www.microsoft.com/en-us/download/details.aspx?id=11533

查看更多
登录 后发表回答