HowTo: Use diff / colordiff Command In Linux

by on November 26, 2012 · 0 comments· LAST UPDATED November 26, 2012

Fig.01: colordiff in action

Use colordiff wherever you would normally use diff, or pipe output to colordiff. For example:

colordiff file1 file2
diff -u file1 file2 | colordiff

If you have wdiff installed, colordiff will correctly colourise the added and removed text, provided that the -n option is given to wdiff:

wdiff -n file1 file2 | colordiff
TwitterFacebookGoogle+Found an error/typo on this page? Help us!

Read full blog post: diff Command: Colorize Output On The Unix / Linux Command Line