[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Comparing files in two directories



On 6/13/07, Cameron Hutchison <lists@xdna.net> wrote:
L.V.Gandhi wrote:

>On 6/13/07, Keith Christian <keithchristian@yahoo.com> wrote:
>>
>> L.V.Gandhi wrote:
>> > I have two directories A and B. In each directory, I have nearly 1000
>> > files with same names. I would like to compare both directories and find
>> > out which files differ more than say 5 lines. I use kompare and see
>> > manually. How to do it in command line easily?
>>
>> Try these diff commands.  The verbosity is greater in the ones with the
>> "u" option.
>>
>Thanks for your effort and time. All these leads to get list of lines
>differing in each file. Once again I have to go through all lines to find
>out total number of lines differing in file X ib both folders A and B.

You can then pipe the output of diff into the diffstat program (in the
package of the same name) which will tell you how many lines have been
added and removed (modified too, but that always seems to come up zero).

That will give you a summary of differences, one line per file changed.
Thanks. This is what  I was looking for.
--
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042
Reply to: