HOW TO : Compare two directories in Linux

Quick post on using diff to compare two directories in Linux. This will show the list of files and subdirectories that are different in either directories

[code]diff /PATH_TO_FIRST_DIRECTORY /PATH_TO_SECOND_DIRECTORY -r –brief  [/code]

Options used

  • r : Searched recursively through the directory
  • –brief : Only shows the names of the files that differ. If you want details of the content that differs, remove this option