This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to increase the memory available to diff in cygwin 1.7?


On Monday, October 26, 2009, Kenneth Chiu  wrote:
> cmp doesn't recurse, though, at least as far as I can tell.
> In theory, I could use find, then cmp, plus some scripting,
> but seems simpler to just write a small C program
> to do it.

Well, as a start, you could try this:

find "$src" -type f -print | while read f; do cmp "$f"  "${f/$src/$dest}" ; done

The concatenation of its stdout and stderr will include
distinguishable lines enumerating the following sets:

 all files in "$dest" that differ from the corresponding file in "$src"
 all directories in "$dest" that correspond to files in "$src" and vice-versa
 all pathnames under "$dest" that don't exist despite there being a
corresponding file under "$src"

Which seems to be all the information you were looking for.  You can
then postprocess the output to format it however you like.

Nothing there screams C to me.  Perl, maybe...

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]