Question - How is cmp command different from diff command?
Answer -
‘cmp’ command is basically used for byte by byte comparison of two files to determine the first mismatch byte. This command does not use the directory name and displays the first encountered mismatched byte.
Whereas, ‘diff’ command’ determines the changes that are to be performed on the files in order to make the two files identical. In this case, directory names can be used.