[prev in list] [next in list] [prev in thread] [next in thread] 

List:       centos
Subject:    Re: [CentOS] Comparing directories recursively
From:       tony () softins ! co ! uk (Tony Mountifield)
Date:       2017-10-30 10:26:54
Message-ID: assp.0476f350f3.ot6upe$1v6$1 () softins ! softins ! co ! uk
[Download RAW message or body]

In article <20171027175431.e265479c4f9b4658fe2179bf@sasktel.net>,
Frank Cox <theatre@sasktel.net> 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@softins.co.uk - http://www.softins.co.uk
Play: tony@mountifield.org - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic