/usr/bin/sum [-r] [file...]
The sum lists the checksum for each of its file arguments. The standard input is read if there are no file arguments.
The following option is supported:
Use an alternate (machine-dependent) algorithm in computing the checksum.
The following operands are supported:
A path name of a file. If no files are named, the standard input is used.
See largefile(5) for the description of the behavior of sum when encountering files greater than or equal to 2 Gbyte (231 bytes).
See environ(5) for descriptions of the following environment variables that affect the execution of sum: LC_CTYPE, LC_MESSAGES , and NLSPATH.
The following exit values are returned.
An error occurred.
See attributes(5) for descriptions of the following attributes:
Read error is indistinguishable from end of file on most devices. Check the block count.
Portable applications should use cksum(1). The default algorithm for this command is defined in the POSIX standard and is identical across platforms.
sum and usr/ucb/sum (see sum(1B)) return different checksums.