diff and diff3 : Both are commands for comparing files and showing the differences.
The diff command is used to compare two files and list out the lines that are different between the files.
If we have tow files "one" and "two" having contents as follows
$ diff one two
The 3c3 signifies the line numbers in which the files differ. The set of numbers before c is for the first file, and the numbers after c specifies the line numbers in the second file.
The lines printed out are the lines that do not match. In the output, the line that begins with "<" belongs to the first file and the line that starts with ">" belongs to the second file and these are separated by "---".
In case the number of files that you want to compare are 3 then diff would not be able to do it.
To compare 3 files we can use diff3 command.
Let us say we have another file named "three"
$diff3 one two three
The output looks a little better structured than diff which has the following format.
"file number": Differing line numbers
Wonder what command to use to compare 4 files :-)