a GNU program to compute checksums and byte counts for every file in the input line.

A byte count is used in lieu of the block count that sum uses to avoid portability issues connected with block size.

cksum has no options out of the mandatory --version and --help.

Here is an example usage of this command:


$ cksum foo 
4112280210 54 foo
$ cp foo bar
$ cksum bar
4112280210 54 bar

You can see that because the first number, "4112280210," is the same in both instances of cksum that the two files are very likely (read: with near probablistic certainty) to be identical.

Here is what happens if we change the file and re-re run cksum:


$ echo achange >> bar
42098022 62 bar

You can see that the numbers, "4112280210," from the before the change and, "42098022," from after the change differ. This is what cksum is all about.

The fields returned from cksum is the CRC followed by a byte count, followed by the filename, all space delimited.

See also: CRC, sum (the command sum(1)), and hash.

Log in or register to write something here or to contact authors.