Generate:
find (your-dir) -type f -print0 | xargs -0 md5sum >> (output-md5sume-file)Verify:
md5sum -c (output-md5sum-file)
my example:
robert@robert-desktop ~/work/nbd-work/ttt $ ls
first second test
robert@robert-desktop ~/work/nbd-work/ttt $ find -type f -print0 | xargs -0 md5sum >> ~/Test/mydir.md5
robert@robert-desktop ~/work/nbd-work/ttt $ cat ~/Test/mydir.md5
d41d8cd98f00b204e9800998ecf8427e ./second
d41d8cd98f00b204e9800998ecf8427e ./first
7423d8fc12da81d779d0485b3d3fb67d ./test
robert@robert-desktop ~/work/nbd-work/ttt $ md5sum -c ~/Test/mydir.md5
./second: OK
./first: OK
./test: OK
robert@robert-desktop ~/work/nbd-work/ttt $ echo $?
0