Re: MD5'ing a directory tree in Linux?

From: Jason Healy (jhealy+security-basics@logn.net)
Date: 06/27/02


Date: Wed, 26 Jun 2002 19:32:16 -0400
From: Jason Healy <jhealy+security-basics@logn.net>
To: security-basics@securityfocus.com

At 1025016954s since epoch (06/25/02 12:55:54 -0400 UTC), Mark G. Spencer wrote:
> Is it possible to MD5 all the items in a directory tree using Linux?

How's about:

find /mumble -type f -exec md5sum {} ';'

That should md5 hash everything under /mumble for you, and print it
out like so:

823eccaf15a1d8bd2c4bb20b29a92d5e /mumble/file1
b058e3e2c19b12d1f5b729234eb7645c /mumble/file2
cd6e741028326c7f66b4174ef3923171 /mumble/dir1/file3
e8a8057a8b652d55af836364adc9f538 /mumble/dir2/file4

... etc

Redirect to a file as desired.

Jason

-- 
Jason Healy
http://www.logn.net/



Relevant Pages