We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

tylerhall on 04/10/07


Tagged

diff unix compare


Versions (?)


Who likes this?

12 people have marked this snippet as a favorite

basicmagic
happolati
rhockens
bartekk
SamuelMiller
copyleft
therobot
koncept
gAmUssA
nimoyjohnson
benpjohnson
Leech


Compare Directories Using Diff


Published in: Bash 


URL: http://www.macosxhints.com/article.php?story=20070408062023352

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 

Comments

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.