linux file compare code example Example 1: how to compare files in terminal diff alpha1.txt alpha2.txt Example 2: find difference between two files command diff file2 file2