Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!YALE.ARPA!LEICHTER-JERRY From: LEICHTER-JERRY@YALE.ARPA.UUCP Newsgroups: mod.computers.vax Subject: Re: Message-ID: <8702271856.AA22026@ucbvax.Berkeley.EDU> Date: Fri, 27-Feb-87 14:43:48 EST Article-I.D.: ucbvax.8702271856.AA22026 Posted: Fri Feb 27 14:43:48 1987 Date-Received: Sun, 1-Mar-87 09:49:26 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Distribution: world Organization: The ARPA Internet Lines: 34 Approved: info-vax@sri-kl.arpa I had someone ask me about the VMS utility CHECKSUM. Until that moment I didn't even know it existed ! I've got the command verb definition and it certainly exists in VMS V4.5 . I'd be grateful if anyone could enlighten me as to what CHECKSUM does, and what it is used for. CHECKSUM has two flavors. The simple one, which Mr. Moeller described correctly, can be applied to any file. It never displays anything, simply leaving a result in the local DCL symbol CHECKSUM$CHECKSUM. This is the default mode of operation, and can be explicitly requested as CHECK/FILE. The other flavor is invoked as CHECKSUM/IMAGE. This applies to images only. It computes checksums of various pieces of the image, ignoring those pieces that have no effect on the running of the program - dates of linking, for example. Thus, this version tells you if two images "are the same program", even if they were produced independently. The resulting checksums are written to SYS$OUTPUT (unless directed elsewhere by a /OUTPUT qualifier). CHECK/IMAGE supports wildcards. The checksum used in both flavors is very simple-minded: The file is treated as an array of longwords, and all of those are simply added up; the result is the checksum. (This description is probably slightly oversimplified, but not by much.) This kind of checksum is useful for checking for things like edits to command files; it is not particularly good for testing for transmission errors, and it is useless for detecting deliberate hacking, as it is trivial to patch a file but leave the checksum unchanged. The CHECKSUM command is there for use by VMSINSTAL, and isn't supported for any other purpose. All the usual warnings about using unsupported software apply. -- Jerry -------