sum
PURPOSE
Displays the checksum and block count of a file.
SYNOPSIS
sum [ -r ] file
DESCRIPTION
The sum command reads file and calculates a 16-bit
checksum for the file and the number of blocks in the
file. The checksum and number of blocks are written to
standard output. The sum command is generally used to
determine if a file that has been copied or communicated
over transmission lines is an exact copy of the original.
FLAG
-r Uses an alternate algorithm to compute the checksum
(rigorous byte-by-byte computation rather than the
default word by word computation).
EXAMPLE
To display the checksum of, and the number of blocks in
"datafile":
sum datafile
If the checksum of "datafile" is "1605" and if the file
contains "3" blocks, then sum displays:
1605 3 datafile
RELATED INFORMATION
The following command: "wc."