Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any file-compare utility-software that can help me compare chunks of text from two text files ?

As in, I want to know what chunks of text that are in one file can be found again in the second file. What I need to do is more like a 'compare and search' operation, not just a compare line by line.

I need this for finding common errors in application logs. Eg., I have a Java application and logs from two different days. I want to find out which stack-traces (that are actually chunks of text inside a text file) are common to both days.

share|improve this question
    
What fileformat is the text you want to compare. –  wizlog Nov 15 '11 at 17:41
    
I think he/she said it quite a number of times already: text. I understand plain text files. –  m0skit0 Nov 15 '11 at 17:42
1  
Have you tried any Difference/Comparing packages already? There's many, some of which will (probably) do what you need. See What is a good text comparison tool for Windows? and perhaps Best Diff Tool? (StackOverflow) –  techie007 Nov 15 '11 at 17:44
    
@techie007 i have only tried Beyond Compare... –  Belun Nov 16 '11 at 14:01
add comment

2 Answers

You can try any number of free diff tools - I've used KDiff3, which is a good open source tool that is available on a number of different platforms. I've been able to use it to compare several log files - there is a visual indication of which lines are different and common between these files (colors for differences, white/no color for common lines).

You may need to experiment a bit to tweak the app to do exactly what you're looking for, but it's a good start.

share|improve this answer
add comment

Zero-times mentioned CompareIT

  • It can detect moved sections and show these blocks
  • It has support for RE, so you can ignore some parts of strings performing operations
  • Automatch rules help on comparing structured sources
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.