The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title>sum</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.01,
  using Pod::Simple::PullParser v2.02,
  under Perl v5.008002 at Thu Aug  5 13:56:36 2004 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>sum - display file checksums and block counts</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<p><b>sum</b> [ <b>-o</b> <i>0|1|2</i> ] [ <b>-h</b> ] [ <i>filename ...</i> ]</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>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.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="OPTIONS_AND_ARGUMENTS"
>OPTIONS AND ARGUMENTS</a></h1>

<dl>
<dt><a name="-h_Display_the_usage_help_message."
><i>-h</i> Display the usage help message.</a></dt><p class="pad"></p>

<dt><a 
><i>-o</i> Specify the output type for file CRC and size.
<code lang='und' xml:lang='und'>0</code>--CRC is computed using the CRC 32 algorithm,
the default unless otherwise specified.
Output size is in bytes.
<code lang='und' xml:lang='und'>1</code>--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.
<code lang='und' xml:lang='und'>2</code>--CRC is computed using SYSV Historic Algorithm 2 (32-bit checksum).
Output size is number of 512 byte blocks.</a></dt><p class="pad"></p>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NOTES"
>NOTES</a></h1>

<p>sum returns 0 on success or 1 if an error occurred.</p>

<p>The program checks the name in which it was called.
If it is anything except &#34;cksum&#34;,
the output will default to BSD Historic Algorithm 1 unless otherwise specified.
Otherwise,
the default is CRC32 mode.</p>

<p>Algorithms 1 and 2 will round up to the next block count for partial blocks.</p>

<p>CRC 32 algorithm ported directly from OpenBSD cksum C source code.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="HISTORY"
>HISTORY</a></h1>

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

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>Theo Van Dinter (felicity@kluge.net)</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>

<p>md5sum(1)</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="POD_ERRORS"
>POD ERRORS</a></h1>

<p>Hey!
<b>The above document had some coding errors,
which are explained below:</b></p>

<dl>
<dt><a name="Around_line_192:"
>Around line 192:</a></dt><p class="pad"></p>

<dd>&#39;=item&#39; outside of any &#39;=over&#39;</dd><p class="pad"></p>

<dt><a name="Around_line_202:"
>Around line 202:</a></dt><p class="pad"></p>

<dd>You forgot a &#39;=back&#39; before &#39;=head1&#39;</dd><p class="pad"></p>
</dl>

<!-- end doc -->

</body></html>