How to find / list all unique files across two directories?
find DIR1 DIR2 -type f -exec sha1sum '{}' \+ | sort | \
uniq -c --check-chars 40 | egrep '^ *1 ' | cut -c 51-
jdupes gained the option you're looking for in June 2020, available in v1.17.0 or higher.
Try this (-r
= recurse, -u
= only print files that didn't match any other files, a.k.a. "uniques"):
jdupes -ru dir1/ dir2/