August 1999
Intermediate to advanced
1000 pages
83h 9m
English
/usr/bin/sum [-r][file...] /usr/ucb/sum [file...]
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.
| -r | Use an alternate (machine-dependent) algorithm in computing the checksum. |
| file | A path name of a file. If you specify no files, use the standard input. |
The following example displays a checksum for the file kookaburra-1.
castle% sum kookaburra-1 23823 1 ...Read now
Unlock full access