Re: Comparing directories recursively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In article <20171027175431.e265479c4f9b4658fe2179bf@xxxxxxxxxxx>,
Frank Cox <theatre@xxxxxxxxxxx> wrote:
> On Sat, 28 Oct 2017 00:47:32 +0200
> Leon Fauster wrote:
> 
> > source:
> > 
> > find . -type f -exec md5sum \{\} \; > checksum.list
> > 
> > destination:
> > 
> > md5sum -c checksum.list
> 
> Wouldn't diff be faster because it doesn't have to read to the end of every file and it isn't really calculating
> anything?  Or am I looking at this in the wrong way.

If the files are the same (which is what the OP is hoping), then diff does
indeed have to read to the end of both files to be certain of this. Only
if they differ can it stop reading the files as soon as a difference
between them is found.

Cheers
Tony
-- 
Tony Mountifield
Work: tony@xxxxxxxxxxxxx - http://www.softins.co.uk
Play: tony@xxxxxxxxxxxxxxx - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux