Name: sum Description: display file checksums and block counts Author: Theo Van Dinter, felicity@kluge.net License:
NAME
sum - display file checksums and block counts
SYNOPSIS
sum [ -o 0|1|2 ] [ -h ] [ filename ... ]
DESCRIPTION
sum outputs three space seperated values: file CRC, file size, and file name. Can be used to find errors in transmitted files. You should not use sum for security checks as they are easily fooled. Look into md5sum for something a bit more secure. If no file names are specified, stdin is used and no file name will displayed in the output.
OPTIONS AND ARGUMENTS
- -h Display the usage help message.
- -o Specify the output type for file CRC and size.
0
--CRC is computed using the CRC 32 algorithm, the default unless otherwise specified. Output size is in bytes.1
--CRC is computed using BSD Historic Algorithm 1 (16-bit checksum with right rotation between byte addition). Output size is number of 1024 byte blocks.2
--CRC is computed using SYSV Historic Algorithm 2 (32-bit checksum). Output size is number of 512 byte blocks.
NOTES
sum returns 0 on success or 1 if an error occurred.
The program checks the name in which it was called. If it is anything except "cksum", the output will default to BSD Historic Algorithm 1 unless otherwise specified. Otherwise, the default is CRC32 mode.
Algorithms 1 and 2 will round up to the next block count for partial blocks.
CRC 32 algorithm 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)
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 198:
'=item' outside of any '=over'
- Around line 208:
You forgot a '=back' before '=head1'