comparing two directory structures

comparing two directory structures

Ehud Karni ehud at unix.mvs.co.il
Sun Sep 5 17:36:17 IDT 2010


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.

Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7976-561  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry



More information about the Linux-il mailing list