I was looking this question and appears everything but crc. Is there a good Ubuntu way around there to do this?
Asked
Active
Viewed 1.5e+01k times
6 Answers
18
One way to calculate it is this:
cksum "file"
Another one is
crc32 "file"
To use this last command you need to install libarchive-zip-perl package
Leo
- 3,644
4
You can try to use rhash.
- http://rhash.sourceforge.net/
- https://github.com/rhash/RHash
- http://manpages.ubuntu.com/manpages/bionic/man1/rhash.1.html
Test:
$ sudo apt-get install rhash
$ echo -n 123456789 | rhash --simple -
cbf43926 (stdin)
Woosung
- 41
4
I'd use the internal md5sum one of the provided sha programs:
sha1sum (1) - compute and check SHA1 message digest
sha224sum (1) - compute and check SHA224 message digest
sha256sum (1) - compute and check SHA256 message digest
sha384sum (1) - compute and check SHA384 message digest
sha512sum (1) - compute and check SHA512 message digest
cksum is pretty much outmoded these days because of its problems.
mdpc
- 1,219
0
you can accomplish this with a very simple perl script. use String::CRC32;
my $s = <STDIN>;
my $crc = crc32($s);
printf "%08x\n", $crc;