Name

cksum

Synopsis

    cksum [files]

Calculate and print a cyclic redundancy check (CRC) sum for each file. The CRC algorithm is based on the polynomial used for Ethernet packets. For each file, cksum prints a line of the form:

              sum count filename

Here, sum is the CRC, count is the number of bytes in the file, and filename is the file’s name. The name is omitted if standard input is used.

Mac OS X Option

-o algorithm

Use a historical algorithm for computing the checksum. Valid values are 1, for the historic BSD 16-bit sum checksum, 2, for the historic System V 32-bit sum checksum, and 3 for a 32-bit CRC that is different from the default algorithm.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.