Kudithipudi.Org

September 11, 2012

HOW TO : Compare two directories in Linux

Filed under: HOWTO,Linux — Vinay @ 10:26 am

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

diff /PATH_TO_FIRST_DIRECTORY /PATH_TO_SECOND_DIRECTORY -r --brief  

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

Powered by WordPress