Re: [Hampshire] File compares

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] File compares

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x56fd7100.hantslug.org.uk.7279': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Tue Jun 24 20:28:49 2008 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Tue, Jun 24, 2008 at 08:22:10PM +0100, James Courtier-Dutton wrote:
> I have two large directories that should be the same but might not due
> to file system problems.
> Does anyone know of a program that can compare two directories and all
> sub directories?
> I tried sha1sum , but it does not have a recurse option.
>
> Any other tools out there.


How about this?

$ (cd dir1; find -type f | xargs sha1sum | sort) >list1
$ (cd dir2; find -type f | xargs sha1sum | sort) >list2
$ diff -u list1 list2

Won't save you from a hash collision, but them's the chances you
take...

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
     --- "I am the author. You are the audience. I outrank you!" ---