NAME

chksum - Computes the file checksum of a file or files. chksum [options] file1 {file2 file3 ...}


DESCRIPTION

chksum provides most of the capabilities of the Unix sum and cksum programs. It also implements the MD5 checksum based on the GNU MD5 code implementation all in one package.


Usage

chksum command can be used to compare a suspect file copied or communicated over noisy transmission lines, internet or unpacked from an archive against an exact copy of a trusted file. The comparison made by the command may not be cryptographically secure ; however, it is unlikely that an accidentally damaged file will produce the same checksum as the original file.

chksum was initially written to offer to OpenVMS Users an exact equivalent tool than what already exists (or available as freeware) under Unix system. However, chksum can be compiled on Unix system and provides the same functionality across platform since the available cksum and sum programs seems to give different results and their options have different meaning.


Options

 -b     Computes the BSD checksum, computation with BUFSIZ blocks
 -r     Computes the BSD checksum, computation with 1Kb blocks
 -s     512-byte blocks SYSV compatible
 -o     1Kb blocks SYSV compatible
 -c     Cyclic Redundancy Check (CRC) checksum and number of bytes
        (according to IEEE Std 1003.2-1992 and X/Open CAE)
 -m     Compute MD5 checksum of files according to the definition
        of MD5 in RFC 1321 from April 1992.

Default is -b unless overwritten by the environment variable CHKSUM_OPTION. This variable should be set to one of ``b'',``r'',``s'',``o'',``c'' or ``m''.


Equivalences

 VMS/Unix       Digital Unix    Linux
 ------------------------------------------------
 $ chksum -r    % sum -r        % sum -r
 $ chksum -o    % sum -o        % sum --sysv
 $ chksum -c    % cksum         % cksum


Limitations

The default option is non-portable (depends on your OS BUFSIZ). It has been preserved for backward compatibility purposes only. To change the default option, define the environment variable CHKSUM_OPTION as described in the Options section.

Currently, only the last version of a file can be checksum-ed under VMS OS.


ReturnValue

CHKSUM returns a EXIT_SUCCESS status if no error was found, each +10 correspond to one file open/close error and +1 for each read-error.

VMS-Note : This return value will produce a VMS cli message which relevance is doubtful AND misleading. We maintained the initial scheme for cross-platform portability reasons i.e. regardless of where you are running chksum, the value returned to the shell can be tested within a script.


Test

How did I test it ? Well, first, I have tested on both Digital Unix and Linux for consistent results. Then, I actually went to the Seti homepage at http://setiathome.ssl.berkeley.edu/ and looked at the different checksum give in http://setiathome.ssl.berkeley.edu/unix.html for alpha_openvms_bck.exe and could reproduce the checksums given ther using -m, -r and -c options. I think that says it all ...


Version&Author

This help describes version 1.20* .

The CRC code has been taken from cksum written by Q. Frank Xia, and Copyright (C) 92, 1995-1999 Free Software Foundation, Inc.

The MD5 checksum has been implemented based on the routines provided in the GNU version of MD5.C, written by Written by Ulrich Drepper and Copyright (C) 1995, 1996 Free Software Foundation, Inc.

This software was otherwise written by Jerome LAURET Copyright (c) 1999-2000 under the terms of the GNU GPL.

If you encounter any problem with this utility (other than IO error), please, send me an Email along with a description of what you did and the file you tried to check. Also, please, send comments/suggestions/flame/blame/curses to me. They are all welcomed and will help other people in future by making this software better.

Email : jlauret@mail.chem.sunysb.edu