Getting access to checksums.
rsimmons0 at gmail.com
Thu Jun 9 21:57:18 UTC 2011
On Thu, Jun 9, 2011 at 3:15 PM, Dan Carroll <fbsd at dannysplace.net> wrote:
> I'm currently working on a system that monitors file changes.
> I'd like to calculate the checksums on each file both to see if a change has
> occured as well as looking for duplicate files.
> I'm not sure what algorithm I'll end up using but I was wondering if it was
> possible to get access to ZFS' checksumming?
> Does it happen on a file level or is it block level only? And if it does,
> is there an easy way to obtain this information from the system?
You may not want to reinvent the wheel. There are quite a few ports
that do what you want, more or less. You may want to start there, and
if they don't serve your purpose, then maybe do it the hard way. ;)
The main one is the famous Tripwire:
Then there are some replacements for Tripwire that you may want to
look at as well:
Also, if you really want to roll your own, just write a script and use
the built-in checksum utilities:
More information about the freebsd-fs