[CentOS] Comparing directories recursively
Leon Fauster
leonfauster at googlemail.com
Sat Oct 28 13:09:49 UTC 2017
> Am 28.10.2017 um 01:54 schrieb Frank Cox <theatre at sasktel.net>:
>
> 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.
Fast was not communicated as requirement, albeit md5 algo works by design "fast" and
it was asked to "to compare file hashes". Nevertheless I also use diff to compare.
It depends on your needs ...
--
LF
More information about the CentOS
mailing list