Re: Program to compare two directory trees

From: Norm Dresner (ndrez_at_att.net)
Date: 09/24/04


Date: Fri, 24 Sep 2004 20:24:34 GMT


"James Antill" <james-netnews@and.org> wrote in message
news:pan.2004.09.24.17.57.29.757033@and.org...
> On Thu, 23 Sep 2004 19:21:41 +0000, Norm Dresner wrote:
>
> > In the distant past I wrote my own program to recursively traverse two
> > parallel directory trees (each at arbitrary depth from the root) and
list
> > the differences between them. The program used (IIRC) stat() to get
file
> > sizes and dates and printed a line on the output for each mismatch.
> >
> > I find myself needing something like this again, but this time I don't
care
> > about the sizes or dates, just the (non-)existence of the files. Before
I
> > reinvent the wheel, is there a (pseudo) standard utility available that
will
> > do this. I'm less likely to make stupid errors that would invalidate my
> > explorations if I can use a pre-tested program than if I have to study
and
> > try to understand code I wrote over a decade ago.
>
> diff -qru <dir> <dir>

Yeah, several people have pointed out that modern versions of diff will do
that. The original program was written back in the '80s for a VAX running a
UNIX-like OS. Ah, progress ...

    Thanks to all who answered.

        Norm



Relevant Pages

  • Re: Program to compare two directory trees
    ... "James Antill" wrote in message ... >> In the distant past I wrote my own program to recursively traverse two ... >> sizes and dates and printed a line on the output for each mismatch. ...
    (comp.os.linux.development.apps)
  • Re: Program to compare two directory trees
    ... "James Antill" wrote in message ... >> In the distant past I wrote my own program to recursively traverse two ... >> sizes and dates and printed a line on the output for each mismatch. ...
    (comp.unix.shell)
  • Re: Program to compare two directory trees
    ... > In the distant past I wrote my own program to recursively traverse two ... > parallel directory trees (each at arbitrary depth from the root) and list ... > sizes and dates and printed a line on the output for each mismatch. ...
    (comp.unix.shell)