That link looks great. I'll try it once I have access to my system.
With regards to the second part, what I meant is being able to generate a unique identifier based on a directory and all of it's contents. I've found this
so I think I'll be able to do what I'm looking for with an MD5 hash via the md5sum command. My motivation for this is that I can then compare the hashes for the two directories to check if there are any differences. It won't tell me what those differences are though and that's what the first part is for.