Can you 'checksum' a file to see if it was changed?

Paul Slootman slootman at dri.nl
Mon May 27 22:12:52 AEST 1991


In article <2286 at twg.bc.ca> bill at twg.bc.ca (Bill Irwin) writes:
>I would like to know if there is a command under SCO XENIX 2.3.3
>that will produce a checksum on a file, so that later, another
>checksum could be compared to the first;  and if different, you
>would know that the file had been modified.

There is a command 'sum' that (surprise!) calculates the checksum.
Some versions have an option -r that causes an alternative
algorithm to be used, which is better at detecting things like
swapped bytes and so (I think, not rely on this). SCO Unix has
this option, I'm not sure about Xenix.

I'm not sure this is the right newsgroup for this... comp.unix.shell?

Paul.
-- 
 ----------------
:slootman at dri.nl : When you get to the point where you think that nothing
:+ 31 5496 88831 : is impossible, try pushing toothpaste back into a tube
 ----------------



More information about the Comp.unix.programmer mailing list