Bulk-generate MD5 hashcodes for certain files in subfolders

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 383
Joined: Tue Nov 12, 2013 2:05 am

Bulk-generate MD5 hashcodes for certain files in subfolders

Post by peter_b »

Here's a one-liner for generating MD5 hashcodes for files matching a certain pattern, but distributed in different subfolders.
For example, I have several MPEG files in different subfolders and I'd like to create a MD5SUM file next to them:

Code: Select all

find BASE_FOLDER -name "*.mpg" -type f -execdir md5sum {} > MD5SUMS \;
Due to md5sum's stderr-output, it's silent, but I was too lazy to improve that right now ;)
Post Reply