Linux Command - diff
The Linux command diff is used to compare files and show the differences. It can also compare directories.
diff file1.txt file2.txt
Just check if they are different:
diff -q file1.txt file2.txt
Side by side diff:
diff -y file1.txt file2.txt
Compare directories:
diff dir1 dir2