sum - print checksum and block count for a file
/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 environ(7) 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(7) 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.
In previous releases of Solaris, there was a usr/ucb/sum that returned a different checksum than the sum command described here due to different blocksizes and algorithms used. The command sum uses 512 btye block sizes while /usr/ucb/sum used 1024 byte block sizes.