SUM(1) | User Commands | SUM(1) |
sum - sum and count blocks in a file
sum [-r] [file]
Sum calculates and prints a 16-bit checksum for the named file, and also prints the number of blocks in the file. It is typically used to look for bad spots, or to validate a file communicated over some transmission line.
If the -r option is present, an alternate checksum algorithm is used.
cksum(1), wc(1)
`Read error' is indistinguishable from end of file on most devices; check the block count.
The default algorithm is unable to detect added or missing NUL bytes. The algorithm selected with -r may produce different results in different implementations. For these reasons, cksum(1) should be used in preference.
2/14/03 | Heirloom Toolchest |