The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

sum - display file checksums and block counts

SYNOPSIS

    sum [-a alg] [-o 1|2] [file ...]

DESCRIPTION

sum outputs three space separated values: file checksum, file size, and file name. The output can be useful for indicating errors in transmitted files. You should not use sum for security checks as they are easily fooled. If no file names are specified, the standard input will be used.

OPTIONS

-a crc

CRC32 algorithm

-a md5

MD5 algorithm

-a sha1

SHA-1 algorithm

-a sha256

SHA-2/256 algorithm

-a sha384

SHA-2/384 algorithm

-a sha512

SHA-2/512 algorithm

-o 1

Historic BSD algorithm

-o 2

Historic SYSV algorithm

NOTES

sum returns 0 on success or 1 if an error occurred.

If the program was executed as "cksum" the default algorithm is CRC32, otherwise the default algorithm is BSD.

The BSD and SYSV algorithms round up to the next block count for partial blocks.

The CRC32 algorithm was ported directly from OpenBSD cksum C source code.

HISTORY

Perl version rewritten for the Perl Power Tools project from the description of the cksum program in OpenBSD.

AUTHOR

Theo Van Dinter (felicity@kluge.net)

SEE ALSO

md5sum(1)