Comparing files in linux shell

We can use below commands to compare files in Linux.
  • diff – Compare files line by line
  • comm – Compare 2 sorted files line by line
  • cmp – Compare 2 files byte by byte

diff command

“diff” command shows the difference between 2 files.
 
$ diff <file1Name> <file2Name>

Web development and Automation testing

solutions delivered!!