diff

Overview

The command-line Linux program diff allows you to check for differences between files and folders.

Compare Two Folders

The following command will make diff compare two folders:

Compare Two Files

The syntax is pretty much the same as if you were to compare two folders. The following command will make diff compare two files:

Quietning The Output

The -q option tells diff to print less output. When comparing folders, this will stop diff from printing the changed content of a file it recognises in both folders, and instead will just tell you that the file has been changed.