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-side
output in two columns-i, --ignore-case
ignore case differences in file contents-E, --ignore-tab-expansion
ignore changes due to tab expansion-Z, --ignore-trailing-space
ignore white space at line end-b, --ignore-space-change
ignore changes in the amount of white space-w, --ignore-all-space
ignore all white space-B, --ignore-blank-lines
ignore 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
> 4
vimdiff
$ vimdiff file1 file2