Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a big fan of meld - a visual diff and merge tool for Gnome. It shows two files (or directories) side by side with their differences highlighted and I can easily select which parts I want to move from one file to the other.

I'm looking for a similar tool but it should work on the (linux) console, eg. do not require any X server. Maybe using a ncurses interface.

Is there such tool?

share|improve this question
up vote 5 down vote accepted

Ah just found out about vimdiff. It pretty much does what I was looking for. here's a quick guide

share|improve this answer
1  
@How to merge/copy changes from on file to another using vimdiff or vim -d – goldenmean Nov 16 '10 at 15:12

You can use vim -d file1 file2 for that.

share|improve this answer

sdiff, a classic command line tool which shows text file differences side by side, also has an interactive merge mode. Use it by running

$ sdiff -o output.txt input1.txt input2.txt

It is the default interactive command line merge tool used by Gentoo Linux' etc-update utility.

Advantages over vimdiff are ubiquitous availability and much simpler handling.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .