Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cksum(1)

wc(1)

environ(5)

sum(1)

NAME

sum − print checksum and block count for a file

SYNOPSIS

sum [−r] [file...]

AVAILABILITY

SUNWesu

DESCRIPTION

The sum utility 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. 

OPTIONS

The following options are supported:

−r Use an alternate (machine-dependent) algorithm in computing the checksum. 

OPERANDS

The following operands are supported:

file A path name of a file.  If no files are named, the standard input is used. 

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of sum: LC_CTYPE, LC_MESSAGES, and NLSPATH. 

EXIT STATUS

The following exit values are returned. 

0 Successful completion. 

>0 An error occurred. 

SEE ALSO

cksum(1), wc(1), environ(5)

DIAGNOSTICS

“Read error” is indistinguishable from end of file on most devices; check the block count. 

NOTES

Portable applications should use cksum(1). 

SunOS 5.5/SPARC  —  Last change: 1 Feb 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026