difference
compare files line by line
References
man diff
diff -y file1 file2 # Output in two columns
# -y == --side-by-side
# e.g. output
1 <
2 2
3 3
> 4
# < : lines from file1
# > : lines from file2-y, --side-by-sideoutput in two columns-i, --ignore-caseignore case differences in file contents-E, --ignore-tab-expansionignore changes due to tab expansion-Z, --ignore-trailing-spaceignore white space at line end-b, --ignore-space-changeignore changes in the amount of white space-w, --ignore-all-spaceignore all white space-B, --ignore-blank-linesignore changes where lines are all blank- ……
Sample
$ cat file1
1
2
3
$ cat file2
2
3
4$ diff file1 file2
1d0
< 1
3a3
> 4%<lines from FILE1%>lines from FILE2
$ diff -y file1 file2
1 <
2 2
3 3
> 4vimdiff
$ vimdiff file1 file2