Alex Rivera | Logout

How can I calculate an MD5 checksum of a directory?

Asked 2009-11-01T14:00:33.507
164

I need to calculate a summary MD5 checksum for all files of a particular type (*.py for example) placed under a directory and all sub-directories.

What is the best way to do that?


The proposed solutions are very nice, but this is not exactly what I need. I'm looking for a solution to get a single summary checksum which will uniquely identify the directory as a whole - including content of all its subdirectories.

Edit
Report

1 Answer

2

GNU find

find /path -type f -name "*.py" -exec md5sum "{}" +;
answered 2009-11-01T14:50:58.710

Your Answer