Portable Powerful Directory Comparison

, Wellesley, MA

I’ve tried a lot of tools for comparing files and directories, but all of them fell short somehow. I wanted a tool that:

  1. Works everywhere. Linux, Mac, Windows. In a terminal window.
  2. Compares directories recursively.
  3. Does two-way and three-way comparisons.
  4. Operates as a Git difftool and mergetool.
  5. Edits files it’s comparing.

If I were a Vim user, I think DirDiff would be great! But my fingers speak Emacs. Generally Emacs’s Ediff is excellent, but I find its directory comparison awkward. It forces you to visit every subdirectory to find the differing needle in the haystack.

My own Emacs dircmp-mode uses Ediff for file comparison, and Rsync for directory comparison. It displays all the differences between a pair of directories in a single buffer and lets you visit any differing file pair in Ediff. I’m using git-diffall to invoke dircmp-mode as an all purpose Git difftool, and Ediff as my Git mergetool.

It’s working well for me. If you try it, I’d love to hear your feedback, good or bad.

Enjoyed reading this post? Discuss it on Reddit, or follow me on Twitter.