Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

wc(1)

SUM(1V)  —  USER COMMANDS

NAME

sum − calculate a checksum for a file

SYNOPSIS

sum filename

SYSTEM V SYNOPSIS

/usr/5bin/sum [ −r ] filename

AVAILABILITY

The System V version of this command is available with the System V software installation option.  Refer to Installing SunOS 4.1 for information on how to install optional software. 

DESCRIPTION

sum 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 ints and machines with 32-bit ints, so it cannot always be used to validate that a file has been transferred between machines with different-sized ints. 

SYSTEM V DESCRIPTION

sum 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.  This algorithm is independent of the size of ints on the machine. 

SYSTEM V OPTIONS

The option −r causes the (machine-dependent) algorithm used by the non-System V sum to be used in computing the checksum. 

SEE ALSO

wc(1)

DIAGNOSTICS

Read error is indistinguishable from EOF on most devices; check the block count. 

Sun Release 4.1  —  Last change: 9 September 1987

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