Mark G. Spencer wrote:
 > Is it possible to MD5 all the items in a directory tree using Linux?
 > I am on a Redhat 7.3 workstation.  I have read the man and info file
 > for MD5SUM and also tried to run it against a directory without
 > success.  I get the error "Is a directory" which is very self
 > explanatory.
 >
 > So .. Is there another MD5 utility with more flexibility?  I
 > basically need to MD5 every file individually in a large directory
 > tree with the output redirected to a text file showing the path,
 > filename, and hash of every file in that directory tree.
 >
 > Thanks for the assistance,
 >
 > Mark
 >
 >

Hi Mark,

Here's an easy way of doing this:

find /etc/ -type f -exec md5sum {} \; > /tmp/my.md5.list

so then in /tmp/my.md5.list we have for example:

b4bed46e057e1e1843a24a7ebfb8ca0d  /etc/csh.login

then I edit /etc/csh.login and run :

md5sum -c /tmp/my.md5.list | grep -v OK

and I see:
/etc/csh.login: FAILED

so it tells me something happened to this file.


But if you are looking for something to do file integrity checks there
are other options.  I beleive that RH 7.3 comes with tripwire, you might
want to check that out.

Hope this helps,
Jeff

Reply via email to