Compare Directories Using Diff

 / Published in: Bash


This command compares two directories and shows you any files that differ between the two. It also shows how to exclude unimportant files like .DS_Store and Thumbs.

  1. diff -qr dirA dirB | grep -v -e 'DS_Store' -e 'Thumbs' | sort

Report this snippet  


RSS Icon Subscribe to comments
Posted By: Leech on July 11, 2008

Great, thank you.. Was looking for this command few days ago.

You need to login to post a comment.