printf "%s\n" /path1/* /path2/* | xargs -L 1 basename | sort | uniq -u

Reply to this note

Please Login to reply.

Discussion

Interesting to get files not present in both directions as that too can be useful.

The piping to xargs is not as performant but I like having alternate means