Manual pages › BSD versions of commands (1B)
sum(1B)
calculate a checksum for a file
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
Also by this name: sum(1), General commands · sum-original(1), General commands
NAME
sum - calculate a checksum for a file
SYNOPSIS
/usr/ucb/sum filename
DESCRIPTION
sum calculates and displays a 16-bit checksum for the named file, and also displays the size of the file in kilobytes. It is typically used to look for bad spots, or to validate a file communicated over some transmission line. The checksum is calculated by an algorithm which may yield different results on machines with 16-bit ints and machines with 32-bit ints, so it cannot always be used to validate that a file has been transferred between machines with differentsized ints.
SEE ALSO
wc(1), sum(1) in the User's Reference Manual.
DIAGNOSTICS
Read error is indistinguishable from EOF on most devices; check the block count.
NOTES
Obsolescent.