'\"macro stdmacro
.if n .pH g1.sum @(#)sum	40.3 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} sum 1 "Directory and File Management Utilities" "\&"
.if \nX=1 .ds x} sum 1 "Directory and File Management Utilities"
.if \nX=2 .ds x} sum 1 "" "\&"
.if \nX=3 .ds x} sum "" "" "\&"
.TH \*(x}
.SH NAME
\f4sum\f1 \- print checksum and block count of a file
.SH SYNOPSIS
\f4sum\f1 [\f4\-r\f1] \f2file\f1
.SH DESCRIPTION
\f4sum\fP
calculates and prints a 16-bit checksum for the named file,
and also prints the number of 512 byte blocks in the file.
It is typically used to look for bad spots, or
to validate a file communicated over
some transmission line.
The option
\f4-r\f1
causes an alternate algorithm to be used
in computing the checksum.
.SH "SEE ALSO"
\f4wc\fP(1).
.SH DIAGNOSTICS
``Read error''
is indistinguishable from end of file on
most devices; check the block count.
.\"	@(#)sum.1	6.2 of 9/2/83
.Ee
