CKSUM(1) General Commands Manual Fully-rendered PDF

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 standard 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 IEEENoStd1003.1-2024PoDoTn.ENPOSIXNs.1DcPc;thefieldseparatercanbeanynonemptysequenceofspacesandtabs.TheCRCpolynomialis%x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1%,thesameoneusedby.St-iso8802-3PqEthernet..PpAllbytesofthefilearesummed,followedbynon-zerobytesofitslength,theleastsignificant...ShHISTORYCreatedin.St-p1003.2-92,as.Nmimplementationswereirreconcilable,cf..Xr1...EQ

December 16, 2024 voreutils 5a9f9f29