Sum (Unix)

Sum is a core Unix utility available on all Unix and Linux distributions. There is a GNU utility written by Kayvan Aghaiepour and David MacKenzie and distributed with the UNIX- and Linux-based operating systems. This utility outputs the checksum of each argument file, as well as the number of blocks they take on disk.[1]

According to the manual page,[1] sum uses two different algorithms for calculating the checksum and blocks, the SYSV checksum algorithm and the BSD checksum (default) algorithm. Switching between the two algorithms is done via command line options.

The algorithms implemented in this program are less sensitive than more modern checksum methods; the SYSV algorithm does not even depend on the order of the data. The GNU manual page states: "sum is provided for compatibility; the cksum program is preferable in new applications".

The sum utility is invoked from the command line according to the following syntax:

sum [OPTION]... [FILE]...

with the possible option parameters being:

When no file parameter is given, or when FILE is -, the standard input is used as input file.

See also

References

  1. 1 2 sum(1) — manual pages from GNU coreutils

External links

This article is issued from Wikipedia - version of the 7/7/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.