File:  [Research Unix] / researchv10dc / man / adm / man1 / sum.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH SUM 1
.CT 1 files
.SH NAME
sum, treesum \- sum and count blocks in a file
.SH SYNOPSIS
.B sum
[
.B -5ri
]
[
.I file ...
]
.PP
.B treesum
[
.I file ...
]
.SH DESCRIPTION
By default,
.I sum
calculates and prints a 32-bit checksum,
a byte count
and the name of
each
.IR file .
The checksum is also a function of the input length.
If no files are given,
the standard input is
summed.
Other summing algorithms are available.
The options are
.TP
.B -i
Read file names from standard input.
.TP
.B -r
Sum with the algorithm of System V's
.B "sum -r"
and print the length (in 1K blocks) of the input.
.TP
.B -5
Sum with System V's default algorithm
and print the length (in 512-byte blocks) of the input.
.PP
.I Sum
is typically used to look for bad spots,
to validate a file communicated over
some transmission line or
as a quick way to determine if two files might be the same.
.PP
.I Treesum
is similar to
.BR "sum -r" ,
except that if
.I file
is a directory, then
.I treesum
recursively descends it, summing all non-directories encountered.
If no files are given,
.IR treesum
recursively sums the current directory.
.SH "SEE ALSO"
.IR wc (1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.