in reply to How to check if a file is modified or missing on windows server using a perl script

A checksum on the file should be sufficient to figure out if the content has changed (provided the checksum of the previous version has been stored somewhere).

  • Comment on Re: How to check if a file is modified or missing on windows server using a perl script

Replies are listed 'Best First'.
Re^2: How to check if a file is modified or missing on windows server using a perl script
by marinersk (Priest) on Nov 01, 2013 at 18:28 UTC
    Checksum is probably good enough (1/256 chance of undetected change if done as an 8 bit ASCII checksum) especially if you also check file size. A CRC module would probably give you even more accurate results if you need to be that specific.

      Yes, checking the file size (and also last modification time) certainly adds quite a bit of reliability (and is fast), and that alone may actually be sufficient for the purposes of crazy-duck, but when I mentioned checksum, I used the word as a general term for describing the overall techniques of digital "footprints", digests or signatures. I am using on some of my platforms "checksum" utilities actually implementing a CRC-32 algorithm, where the chances of undetected change are 1 in billions (at least in theory).

        Yes, I tend to use external utilities as well; specifically ones which yield the same results on Linux and Windows. If you have any module suggestions for CRC-32 I would be interested in stealing from your experience base. :-)