diff stands for difference. This command is used to display the differences in the files by comparing the files line by line. Unlike its fellow members, cmp and comm, it tells us which lines in one file have is to be changed to make the two files identical.
What is diff used for?
Typically, diff is used to show the changes between two versions of the same file. Modern implementations also support binary files. The output is called a “diff”, or a patch, since the output can be applied with the Unix program patch.
What is diff output?
Updated: 05/04/2019 by Computer Hope. On Unix-like operating systems, the diff command analyzes two files and prints the lines that are different. In essence, it outputs a set of instructions for how to change one file to make it identical to the second file.