Sure, but my example was just that and I actually use /identical$/ as the pattern. Sorry for the typo.
And I use this "historic" one liner only when I know about the contents of both directories. As soon as I need a "safer" solution I use a Perl script and pattern matching, as I said.