41 lines
1.0 KiB
Groff
41 lines
1.0 KiB
Groff
'\"macro stdmacro
|
|
.if n .pH g1.sum @(#)sum 30.2 of 12/25/85
|
|
.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
|
|
sum \- print checksum and block count of a file
|
|
.SH SYNOPSIS
|
|
.B sum
|
|
[
|
|
.B \-r
|
|
]
|
|
file
|
|
.SH DESCRIPTION
|
|
.I sum\^
|
|
calculates and prints a 16-bit checksum for the named file,
|
|
and also prints the number of blocks in the file.
|
|
.B NULL
|
|
characters (with ASCII value zero) are ignored in computing the checksum.
|
|
.I sum\^
|
|
is typically used to look for bad spots, or
|
|
to validate a file communicated over
|
|
some transmission line.
|
|
The option
|
|
.B \\-r
|
|
causes an alternate algorithm to be used
|
|
in computing the checksum.
|
|
This alternate algorithm does not ignore NULL characters.
|
|
.SH "SEE ALSO"
|
|
wc(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
|
|
'\".so /pubs/tools/origin.att
|