jonseymour jonseymour - 2 years ago 94
Linux Question

Where can I find a Linux implementation of cksum that does what OSX cksum -o3 does?

I am trying to reproduce the CRC32 calculations that the u-boot crc32 command does with a Linux utility.

I have discovered, by experiment, that OSX cksum command, with the -o3 option will produce identical check sums to those produced by u-boot crc32 command, but that the GNU coreutils version of cksum does not support the -o3 option and does not produce the same results as u-boot crc32. I have also tried the GNU coreutils 'sum' command.

Does anyone know of a debian package that has a cksum command (or equivalent) that produces the same outputs as the cksum -o3 command on OSX?

Answer Source

The cksum from package coreutils doesn't support -o3 option, however, there is another cksum from freebsd-buildutils with -o3 support.

$ sudo apt-get install freebsd-buildutils

After installation of freebsd-buildutils, be sure that you run the correct cksum.

$ dpkg-query -L freebsd-buildutils

gives the file list installed with freebsd-buildutils, for example in my environment it is in /usr/lib/freebsd/cksum

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download