MD5 checksum

MKlinke mklinke at axsi.com
Thu Jun 10 04:23:13 UTC 2004


On Wednesday 09 June 2004 22:41, Roger wrote:
> Hi. There
>
> I plan to use md5sum to get the digest of each file in some
> folders, like /etc /sbin .. and keep this as cron job, so that I
> can check the integrity of system.
> But it seems that md5sum can't calculate a sub folder, and always
> inform that something is a folder bla bla..
> So, what should I do? Thanks!

A quick hack that you may find useful....

find <path> -print | xargs -i file {} | grep -v directory | cut -d : 
-f 1 | xargs -i md5sum {}

All on one line and replace <path> above with your desired directory.

Regards, Mike Klinke





More information about the redhat-list mailing list