File comparison compares the contents of computer files, finding their common contents and their differences. The result of the comparison is often known as a diff. diff is also the name of a famous console based file comparison utility that outputs the differences between two files. The diff utility was developed in the early 1970s on the Unix operating system. diff will output the parts of the files where they are different.