Manual / cksum
cksum(1)
| CKSUM(1) | General Commands Manual | CKSUM(1) |
NAME
cksum - write a file checksum and byte count
SYNOPSIS
cksum [ file ] ...
DESCRIPTION
Cksum computes a cyclic redundancy check for each named file (standard input if none is given) and writes, for each one, the checksum, the number of octets read, and — if an operand named it — the file's own pathname, one line per file. A run with no operands prints no pathname at all, matching every other checksum-shaped tool in this tree (sum(1)). Unlike sum(1), cksum prints a pathname for EVERY named operand, even a single one.
The checksum is the CRC used by the POSIX cksum utility: a 32-bit CRC (polynomial 04C11DB7, most-significant bit first, initial value zero) computed over the file's own bytes, then over the octets of the file's length itself (least significant octet first, stopping the instant the remaining length is zero — an empty file folds in none), and finally complemented. This is not the same algorithm as zlib's CRC-32.
FILES
/usr/man/CKSUM this page
SEE ALSO
DIAGNOSTICS
Exit status is 0; 1 if a file named on the command line could not be opened — that file is skipped, a diagnostic naming it is written to standard error, and the remaining operands are still processed.
BUGS
None known.
| September 14, 2026 | maux |