On 20 September 2016 at 10:33, Ahmad Samir <ahmadsamir3891(a)gmail.com> wrote:
On 20 September 2016 at 01:23, Chris Murphy
<lists(a)colorremedies.com> wrote:
> Drives A and B have many overlapping files but I want to find out what
> files don't exist on each. Thwarting this is directory structure
> differs between the two drives, and I'm fairly certain some of the
> file names differ on the two drives also.
>
> Therefore I need something hash based. I started with this:
>
>
> $ find /brickA -type f -exec md5sum "{}" + > brickA.txt
> $ find /brickB -type f -exec md5sum "{}" + > brickB.txt
>
Here's a crude way:
$ find /brickA -type f -exec md5sum "{}" + | sort > brickA.txt
$ find /brickB -type f -exec md5sum "{}" + | sort > brickB.txt
$ diff -U 0 brickA.txt brickB.txt | sort -k 1.1,1.1 > A-B.diff
Ignoring lines beginning with @@, +++ or --- , the lines beginning
with - are in A but not B ... etc
Please disregard that, it won't work...
[...]
--
Ahmad Samir
--
Ahmad Samir