Using "find" to compare lists of files

To compare two lists of files (without checking contents) on UNIX, with the find command:

diff <(find DIR1 -printf '%P\n' | sort) <(find DIR2 -printf '%P\n' | sort) | grep '^[<>]'

Note: this is a copy-paste from a StackOverflow answer by Piotr Siupa. There are hopefully other ways to do this, but this was the simplest and easiest solution I was able to find (and it matches the approach I was planning to use).