---

How to Compare Local and Remote Files in Linux

diff (short for difference) is a simple and easy to use tool which analyzes two files and displays the differences in the files by comparing the files line by line. It prints the lines that are different. Importantly, if you want the two files to be identical to each other, diff also outputs a set of useful instructions on how to change one file to make it identical to the second file.

Get the Free Newsletter!

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