---

An introduction to the diff command

The command diff from the package diffutils compares files line by line. It comes in very handy when you would like to check if there were recent changes to a file since the last backup and what they are. An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble. And of course, if there are changes, diff will show them to you.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis