opposite of diff unix

C++
fgrep -x -f file1 file2		#does not change the order of the lines
join a.txt b.txt		#If both text files are sorted
Source

Also in C++: