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
cksum command in Linux is used to display a CRC(Cyclic Redundancy Check) value , the byte size of the file and the name of the file to standard output. CRC is unique for each file and only changes if the file is edited. It is used to check whether the file had accidentally corrupted while transfer.
The cksum command reads the files specified by the File parameter and calculates a 32-bit checksum Cyclic Redundancy Check (CRC) and the byte count for each file. If no files are specified, the cksum command reads standard input. The checksum, number of bytes, and file name are written to standard output.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With