Newsgroups: comp.unix.programmer
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!phil
From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN)
Subject: Re: Can you 'checksum' a file to see if it was changed?
Message-ID: <1991May29.013745.15262@ux1.cso.uiuc.edu>
Organization: University of Illinois at Urbana
References: <2286@twg.bc.ca> <2287@twg.bc.ca>
Date: Wed, 29 May 1991 01:37:45 GMT
Lines: 19

bill@twg.bc.ca (Bill Irwin) writes:

>The answer to this was sitting in my mailbox when I got into the
>office the morning after posting.  Talk about service!
>
>There is a "sum" command that will output a checksum for a file.

This is a useful command, too.  For instance I use it in my crosslink
script which first checks files for like sizes, and if alike, then it
takes the checksum to see if they still might be alike.  The first
file is summed only once a second file is found of the same size.
If the sums match, then the files are compared with "cmp" for the
final determination.  If they are identical, they are hardlinked.
Cuts down on space in some cases.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/
