Author: James Courtier-Dutton
Date:
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] File compares
2008/6/24 Hugo Mills <hugo@???>:
>
> 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
>
Final command turned out to be this:
(cd dir1; find -type f -print0 | xargs -0 sha1sum -b) >list1
I needed the -print0 because of spaces in file names.
Thank you very much for the sample.
James