One option would be to use rsync
. Something like:
rsync -n -r -v -C dir_a dir_b
The -n
option does a dry-run so no files will be modified. -r
does a recursive comparison. Optionally turn on verbose mode with -v
. (You could use -i
to itemize the changes instead of -v
.) To ignore commonly ignored files such as .svn/
use -C
.
This should be faster than a simple diff
as I read the rsync
manpage:
Rsync finds files that need to be transferred using a "quick check"
algorithm (by default) that looks for files that have changed in size
or in last-modified time. Any changes in the other preserved
attributes (as requested by options) are made on the destination file
directly when the quick check indicates that the file's data does not
need to be updated.
Since the "quick check" algorithm does not look at file contents directly, it might be fooled. In that case, the -c
option, which performs a checksum instead, may be needed. It is likely to be faster than an ordinary diff
.
In addition, if you plan on syncing the directories at some point, this is a good tool for that job as well.