comparing two directory structures

comparing two directory structures

Gabor Szabo szabgab at gmail.com
Mon Sep 6 09:03:52 IDT 2010


On Sun, Sep 5, 2010 at 5:36 PM, Ehud Karni <ehud at unix.mvs.co.il> wrote:
> On Sat, 4 Sep 2010 12:21:40, Gabor Szabo wrote:
>>
>> I guess there is an obvious command for this, I just don't know it.
>>
>> How can I compare two directory structures if the content is the same
>> *disregarding*
>> actual file content, or comparing that only if the file names and
>> sizes are the same?
>>
>> As I understand diff -r  would do it but it would also compare files
>> line by line.
>
> I had the same problem, so I patched diff to do it.
>
> I added 2 switches -Z: compare by siZe only,
>                   -M: different Modification time is a difference.
>
> For a full description with the patches see:
>    http://www.mail-archive.com/bug-diffutils@gnu.org/msg00023.html
>
>> As these are images and movies, I don't want to compare them line by
>> line or event byte by byte.
>
> Seems very common these days.
>

Very nice.
I could not find it out from the archive, has it been accepted?

Gabor



More information about the Linux-il mailing list