CKSUM(1) General Commands Manual CKSUM(1)

cksumcompute Ethernet checksum

cksum [--] [file]…

Writes an Ethernet CRC of each file, its size in bytes, and its name, separated by tabs, followed by newlines, to the stnadard output stream. If no files, use the standard input stream and omit the name. If a file is "-", use the standard input stream.

The files' size is also included in the sum, so files beginning with runs of NUL bytes produce different results.

$ echo POSIX.2 | cksum
3842620415      8
$ echo POSIX.2 | cksum 'IEEE P1003.2 Draft 11.2—September 1991.pdf' -
2938529873      3226947 IEEE P1003.2 Draft 11.2—September 1991.pdf
3842620415      8       -

sha1sum(1), sum(1)

Conforms to IEEE Std 1003.1-2008 (“POSIX.1”); the field separater can be any nonempty sequence of spaces and tabs. The CRC polynomial is x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 , the same one used by ISO 8802-3: 1989 (Ethernet).

All bytes of the file are summed, followed by non-zero bytes of its length, from the least significant.

Created in IEEE Std 1003.2-1992 (“POSIX.2”), as sum implementations were irreconcilable, cf. sum(1).

November 23, 2022 voreutils pre-v0.0.0-latest