Linux and Unix comm command
Select or reject lines common to two files.
comm [-1] [-2] [-3 ] file1 file2
|-1||Suppress the output column of lines unique to file1.|
|-2||Suppress the output column of lines unique to file2.|
|-3||Suppress the output column of lines duplicated in file1 and file2.|
|file1||Name of the first file to compare.|
|file2||Name of the second file to compare.|
comm myfile1.txt myfile2.txt
The above example would compare the two files myfile1.txt and myfile2.txt.