sum — Print Checksum and Block Count for a File
Synopsis
/usr/bin/sum [-r][file...] /usr/ucb/sum [file...]
Description
The sum command calculates and prints a 16-bit checksum for the named file and the number of 512-byte blocks in the file. It is typically used to look for bad spots or to validate a file communicated over some transmission line.
Portable applications should use cksum(1).
Note
sum and /usr/ucb/sum (see sum(1B)) return different checksums.
Options
-r | Use an alternate (machine-dependent) algorithm in computing the checksum. |
Operands
file | A path name of a file. If you specify no files, use the standard input. |
Examples
The following example displays a checksum for the file kookaburra-1.
castle% sum kookaburra-1 23823 1 ...
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.