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 blake224

BLAKE/224 algorithm (requires Digest::BLAKE)

-a blake256

BLAKE/256 algorithm (requires Digest::BLAKE)

-a blake384

BLAKE/384 algorithm (requires Digest::BLAKE)

-a blake512

BLAKE/512 algorithm (requires Digest::BLAKE)

-a crc

CRC32 algorithm

-a jh224

JH/224 algorithm (requires Digest::JH)

-a jh256

JH/256 algorithm (requires Digest::JH)

-a jh384

JH/384 algorithm (requires Digest::JH)

-a jh512

JH/512 algorithm (requires Digest::JH)

-a haval256

Haval256 algorithm (requires Digest::Haval256)

-a md2

MD2 algorithm (requires Digest::MD2)

-a md4

MD4 algorithm (requires Digest::MD4)

-a md5

MD5 algorithm

-a sha1

SHA-1 algorithm

-a sha224

SHA-2/256 algorithm

-a sha256

SHA-2/256 algorithm

-a sha384

SHA-2/384 algorithm

-a sha512

SHA-2/512 algorithm

-a sha3-224

SHA-3/224 algorithm (requires Digest::SHA3)

-a sha3-256

SHA-3/256 algorithm (requires Digest::SHA3)

-a sha3-384

SHA-3/384 algorithm (requires Digest::SHA3)

-a sha3-512

SHA-3/512 algorithm (requires Digest::SHA3)

-a whirlpool

Whirlpool algorithm (requires Digest::Whirlpool)

-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)