calculate a checksum and count the blocks in a file
sum [ -lr ] [ file ... ]
sum calculates and prints a checksum for the named
file, and also prints the number of 512-byte blocks
in the file.
If no file is named, standard input is used.
sum is typically used to validate data after being
transported across unreliable media. It is also useful when you want
to reduce the contents of a file into a representative value.
Print a long (32-bit) checksum. (The default is to print a short
Use an alternate (older) algorithm to compute the checksum. This
alternate algorithm is sensitive to the order of the bytes in the
data; the standard algorithm is not.
``Read error'' is indistinguishable from ``End-of-file'' on most
devices, so you need to check the block count.
sum is conformant with:
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992: note that this command is marked as to be
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003