[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    sum(1) manual page Table of Contents

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 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.
  1. Successful completion.
    >0
    An error occurred.

    See Also

    cksum(1) , sum(1B) , 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) .

    sum and usr/ucb/sum (see sum(1B) ) return different checksums.


    Table of Contents