1

What I want:

  • recursively compare all files which are in both directories
  • option to ignore multiple specific directories (e.g. node_modules and .git)
  • highlighting of differences on word/character level (e.g. abc changes to axc, so x will be highlighted)
  • runs on Linux
  • free (as in legally obtainable and usable for unlimited time for any purpose without any cost)

Preferably under an open source license.

I am using diff and while it matches most of the requirements, it can't show differences in line, just lines that changed (no quick way to tell, what changed on that line). I also tried kdiff3 which (at least looking at --help) can't compare directories. It doesn't matter to me if it's CLI or GUI.

1 Answer 1

1

You can use diff as you did, and then pipe the output into diff-so-fancy , which is free.

I have two files , f1.txt and f2.txt . they are 3 lines long, and they differ only in one character in line 2.

The diff-so-fancy output looks like this:

diff-so-fancy

I had to add the screenshot to display the colors as I see them. Perhpas they look different on your computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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