home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
filutl
/
chksum2.arc
/
README
< prev
Wrap
Text File
|
1989-03-13
|
3KB
|
77 lines
readme 890313 NHA
Chksum is a program which calculates a 32-bit checksum for one or more
files. Optionally it will also count the characters in the file.
All I/O is through DOS, so any machine running DOS (version 2.0 or later,
I think) should suffice. On my At-03 with a disk cache program,
it runs at 1 MByte/minute, which is about the limit using DOS.
Filenames are taken from the command line, with two special filenames
to provide more flexibility. The special filename '-' means to read
the standard input as a file. The special filename '--' means to
read a list of filenames (1 per line) from the standard input. This
last capability, in conjunction with Rahul's STUFF or the standard
unix FIND command, enables one to perform checksumming over entire
directory trees.
This program has also been distributed in source (C) form, and runs
with identical results under 4.3bsd on a VAX. Note that under DOS
wildcard characters in a filename are not expanded. Note also that
if you copy a file between DOS and UNIX you will probably get different
checksums if you used the default ASCII mode in FTP.
Special care has been taken to ensure that the total checksum for
a group of files will be identical to that for their concatenation.
That means that the following two invocations will produce the
same grand total:
chksum file1 file2 file3
cat file1 file2 file3 | chksum -
This is useful for the paranoid after using the unix SPLIT command.
Invoking the command 'chksum' or 'chksum -h' results in the following
output:
chksum -- calculate 32-bit checksum for file(s), output to stdout
Usage: chksum [-cehtv] {file|--|-}...
-c Count bytes also
-e give extended Error reports on stderr
-h Help; give this help message and exit
-t Total only; don't list sum for each file
-v Verbose; list filenames along with checksums
-- take filenames from stdin, 1 name per line
- take stdin as a file
Filenames may be mixed with options.
Exit status is the number of file errors encountered.
When I say that filenames may be mixed with options, I mean that
the command line is read from left to right, and anything found is
acted upon as soon as it is seen. Thus you could do something like:
chksum foo -c bar
And you would receive a byte count for bar, but not for foo.
At the moment option characters cannot be combined (-vc) and
the DOS switchar is ignored; '-' is always used for options and
pathnames are simply handed to DOS.
To confirm that you got all the right bits, try running the following
command:
chksum -v -c chksum.exe
The output should be:
56755e1f 11198 chksum.exe
Complaints, suggestions, compliments should be directed to me at the
below-specified address(es):
NHA
---
PAPER: Norman Azadian; Hasler AG; Belpstrasse 23; 3000 Berne 14; Switzerland
X.400: naz@hslrswi.hasler
UUCP: ...{uunet,ukc,mcvax,...}!cernvax!hslrswi!azadian
VOICE: +41 31 63 2178 BITNET: naz%hslrswi.UUCP@cernvax.BITNET