NAME
cksum
—
compute Ethernet checksum
SYNOPSIS
cksum |
[-- ] [file]… |
DESCRIPTION
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.
EXAMPLES
$
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 -
SEE ALSO
STANDARDS
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 , 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.
HISTORY
Created in IEEE Std 1003.2-1992
(“POSIX.2”), as sum
implementations were irreconcilable, cf.
sum(1).