Handy Linux Tips: diff recursive compare on folders

Handy dandy tip to compare two project folders to see which files are different.

diff -rq --exclude='\.*' folder1 folder2

Quick Explanation:

  • -r is for recursive
  • -q (or –brief) is for just showing which files are different
  • –exclude=’\.*’ excludes all dot files and folders (great for excluding .svn and Zend frameworks .cache folders)
  • Folder 1 – the new one
  • Folder 2 – the original one