unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 sum(1)                                                               sum(1)




 NAME
      sum - print checksum and block or byte count of file(s)

 SYNOPSIS
      sum [-r] [-p] [file ...]

    Remarks
      sum is obsolescent and should not be used in new applications that are
      intended to be portable between systems.  Use cksum instead (see
      cksum(1)).

 DESCRIPTION
      sum calculates and prints to standard output a checksum for each named
      file, and also prints the size of the file in 512 byte blocks, rounded
      up.

      The default algorithm is a 16-bit sum of the bytes in which overflow
      is ignored.  Alternate algorithms can be selected with the -r and -p
      options.

      Standard input is used if no file names are given.

      sum is typically used to verify data integrity when copying files
      between systems.

    Options
      sum recognizes the following options:

           -r        Use an alternate algorithm in which the 16-bit sum is
                     right rotated with each byte in computing the checksum.

           -p        Use the 32-bit cyclical redundancy check (CRC)
                     algorithm used by cksum.

 RETURN VALUE
      sum returns the following values upon completion:

            0        All files were processed successfully.

           >&gt&gt>0        One or more files could not be read or some other error
                     occurred.

      If an inaccessible file is encountered, sum continues processing any
      remaining files, but the final exit status is affected.

 DIAGNOSTICS
      Read error conditions are indistinguishable from end of file on most
      devices; check the block or byte count.

 WARNINGS
      This command is likely to be withdrawn from X/Open standards.



 Hewlett-Packard Company            - 1 -   HP-UX Release 11i: November 2000






 sum(1)                                                               sum(1)




      Applications using this command might not be portable to other
      vendors' platforms. The usage of cksum(1) is recommended.

 SEE ALSO
      cksum(1), wc(1), pdf(4).

 STANDARDS CONFORMANCE
      sum: SVID2, SVID3, XPG2, XPG3














































 Hewlett-Packard Company            - 2 -   HP-UX Release 11i: November 2000