I usually use
rsync for this task:
rsync -nav --delete DIR1/ DIR2
BE VERY CAREFUL to always use the
--dry-run, option, or it will synchronize (change the contents of) the directories.
This will compare files based on file modification times and sizes... I think that's what you really want, or at least you don't mind if it does that? I got the sense that you just want it to happen faster, not that you need it to ignore the difference between file contents. If you do want it to not list differing files with identical names, I think the addition of the
--ignore-existing option will do that.
Also be aware that not putting a
/ at the end of
DIR1 will cause it to compare the directory
DIR1 with the contents of
The output ends up being a bit verbose, but it will show you which files/directories differ. Files/directories present in
DIR2 and not in
DIR1 will be prefaced with the word
For some situations, @slartibartfast's answer may be more appropriate, though you'll need to remove the
-type d option to enable the listing of non-directory files.
rsync will be faster if you've got a significant number of files/directories to compare.