SUM(1) SUM(1) NAME sum, treesum - sum and count blocks in a file SYNOPSIS sum [ -5ri ] [ file ... ] treesum [ file ... ] DESCRIPTION By default, sum calculates and prints a 32-bit checksum, a byte count and the name of each file. The checksum is also a function of the input length. If no files are given, the standard input is summed. Other summing algorithms are available. The options are -i Read file names from standard input. -r Sum with the algorithm of System V's sum -r and print the length (in 1K blocks) of the input. -5 Sum with System V's default algorithm and print the length (in 512-byte blocks) of the input. Sum is typically used to look for bad spots, to validate a file communicated over some transmission line or as a quick way to determine if two files might be the same. Treesum is similar to sum -r, except that if file is a directory, then treesum recursively descends it, summing all non-directories encountered. If no files are given, treesum recursively sums the current directory. SEE ALSO wc(1)