Automate hashing for each file in a folder?

Posted by Kennie R. on Server Fault See other posts from Server Fault or by Kennie R.
Published on 2011-02-14T05:43:03Z Indexed on 2011/02/14 7:26 UTC
Read the original article Hit count: 175

Filed under:
|
|

I have quite a few FTP folders, and I add a few each month and prefer to leave some sort of method of verifying their integrity, for example the files MD5SUMS, SHA256SUMS, ... which I could create using a script. Take for example:

find ./ -type f -exec md5sum $1 {} \;

This works fine, but when I run it each time for each shaxxx sum afterwards, it creates a sum of the MD5SUMs file which is really not wanted.

Is there a simpler way, or script, or common way of hashing all the files in to their sums file without causing problems like that? I could really use a better option.

© Server Fault or respective owner

Related posts about linux

Related posts about bash