RE: MD5'ing a directory tree in Linux?

From: Steven Micallef (steven.micallef@world.net)
Date: 06/27/02


From: Steven Micallef <steven.micallef@world.net>
To: "'Mark G. Spencer'" <mspencer@evidentdata.com>, security-basics@securityfocus.com
Date: Thu, 27 Jun 2002 10:02:45 +1000

Hi,

This should do the trick:

for file in `find . -type f`
do
        md5sum $file
done > md5sums.txt

Regards,

Steve.

> -----Original Message-----
> From: Mark G. Spencer [mailto:mspencer@evidentdata.com]
> Sent: Wednesday, 26 June 2002 2:56 AM
> To: security-basics@securityfocus.com
> Subject: MD5'ing a directory tree in Linux?
>
>
> Is it possible to MD5 all the items in a directory tree using
> Linux? I
> am on a Redhat 7.3 workstation. I have read the man and info file for
> MD5SUM and also tried to run it against a directory without
> success. I
> get the error "Is a directory" which is very self explanatory.
>
> So .. Is there another MD5 utility with more flexibility? I basically
> need to MD5 every file individually in a large directory tree with the
> output redirected to a text file showing the path, filename,
> and hash of
> every file in that directory tree.
>
> Thanks for the assistance,
>
> Mark
>



Relevant Pages

  • RE: MD5ing a directory tree in Linux?
    ... MD5'ing a directory tree in Linux? ... Is it possible to MD5 all the items in a directory tree using Linux? ... MD5SUM and also tried to run it against a directory without success. ...
    (Security-Basics)
  • Re: MD5ing a directory tree in Linux?
    ... Spencer wrote: ... > Is it possible to MD5 all the items in a directory tree using Linux? ...
    (Security-Basics)
  • FW: MD5ing a directory tree in Linux?
    ... > I think the normal integrity programs like Tripwire or Aide ... > Is it possible to MD5 all the items in a directory tree using Linux? ...
    (Security-Basics)
  • RE: MD5ing a directory tree in Linux?
    ... MD5'ing a directory tree in Linux? ... > MD5SUM and also tried to run it against a directory without success. ... Is there another MD5 utility with more flexibility? ...
    (Security-Basics)
  • Re: MD5ing a directory tree in Linux?
    ... "Mark G. Spencer" wrote: ... > Is it possible to MD5 all the items in a directory tree using Linux? ... Is there another MD5 utility with more flexibility? ...
    (Security-Basics)