Visual Diff Tools in Linux

Running the regular diff between two text files to see the differences is not so elegant for the human eye to decode. Luckily there are plenty of tools out there to make this easy.

Command Line:

sdiff file-1 file-2

This is a much more elegant tool compared to diff, if you are looking for a quick command-line utility that shows the difference between two text files. While using it on big files, its better to pipe the output to less command.

sdiff file1 file2 | less

Disadvantage with this is read only output no editing or merging is possible. Update: Use sdiff -o out_file file1 file2 to interactively merge file1 and file2 and write the output into out_file. (Thanks to anonymous commenter)


vimdiff file-1 file-2

This can open "n" number of files in a vertically split vim environment. This has color highlighting to specify the areas that differ in the file. Editing is possible. This is a complete vim-environment, so all the vim keys are usable. Here is a quick and dirty tutorial on how to use vimdiff.


M-x ediff-buffers

This is an emacs equivalent of vimdiff with copy to left, copy to right, merge changes and much more. This is a special ediff mode which has its own key bindings. Hit ? to get help on the keyboard shortcuts.

Colored highlighting for distinguishing differences. Easy navigation to diff regions.

A maximum of 3 files can be compared and merged. Both comand-line and gui mode are available.

Visual Tools:


Can compare two or three files and allows editing. The differences are dynamically updated. This can work with version control systems like CVS, SVN etc. Folder comparison is possible.


Taken from the kdiff3’s website.

Directory differences and merging are possible.



Fill in your details below or click an icon to log in:

వర్డ్‌ప్రెస్.కామ్ లోగో

You are commenting using your account. నిష్క్రమించు / మార్చు )

Twitter picture

You are commenting using your Twitter account. నిష్క్రమించు / మార్చు )

ఫేస్‌బుక్ చిత్రం

You are commenting using your Facebook account. నిష్క్రమించు / మార్చు )

గూగుల్+ చిత్రం

You are commenting using your Google+ account. నిష్క్రమించు / మార్చు )

Connecting to %s