compare two files in linux use open and read code example Example: find difference between two files command diff file2 file2