'\"macro stdmacro
.if n .pH g1.sum @(#)sum	40.5 of 8/1/89
.nr X
.if \nX=0 .ds x} sum 1 "BSD Compatibility Package" "\&"
.if \nX=1 .ds x} sum 1 "BSD Compatibility Package"
.if \nX=2 .ds x} sum 1 "" "\&"
.if \nX=3 .ds x} sum "" "" "\&"
.TH \*(x}
.\" @(#)sum.1 1.3 88/12/12 SMI; from S5
.\"macro stdmacro
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.\"
.SH NAME
\f4sum\f1 \- calculate a checksum for a file
.SH SYNOPSIS
\f4/usr/ucb/sum\f1
.I filename
.SH DESCRIPTION
\f4sum\f1
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
\f4int\f1s
and machines with 32-bit
\f4int\f1s,
so it cannot
always be used to validate that a file
has been transferred between machines
with different-sized
\f4int\f1s.
.SH "SEE ALSO"
\f4wc\fP(1),
\f4sum\fP(1)
in the \f2User's Reference Manual\f1.
.SH DIAGNOSTICS
\f4Read error\f1
is indistinguishable from
.SM EOF
on most devices; check the block count.
.SH NOTES
Obsolescent.
.Ee
