printf "%s\n" /path1/* /path2/* | xargs -L 1 basename | sort | uniq -u
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
printf "%s\n" /path1/* /path2/* | xargs -L 1 basename | sort | uniq -u
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