cksum — Write File Checksums and Sizes

Synopsis

/usr/bin/cksum [file...] 

Description

The cksum command calculates and writes to standard output a cyclic redundancy check (CRC) for each input file and also writes to standard output the number of octets in each file.

For each file processed successfully, cksum writes in the following format:

"%u %d %s\n" checksum, # of octets, pathname
					

If you do not specify a file operand, the path name and its leading space are omitted.

The CRC is based on the polynomial used for CRC error checking in the referenced Ethernet standard.

The encoding for the CRC checksum is defined by the generating polynomial:

G(x) = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 
     + x2 + x + 1 

Mathematically, ...

Get Solaris™ 7 Reference 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.