≡ Menu

HowTo: Use diff / colordiff Command In Linux

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

Comments on this entry are closed.