How do I compare two directories and list files which are unique to one directory and not another?
I'm needing to compare two directories and want to find files which are NOT duplicates. Filename is sufficient for this task; I'm not really concerned about the contents.
I have many iPhoto libraries and I'm looking to get the unique files from them so I can combine them into one library. I'm in the Package Contents, looking thru the directories, and am only interested in the originals, not the modified. Probably 99%+ will be duplicates with only an outlying few dozen unique out of a list of 20K+ files. If there's an app out there which already does this, that would be great, but everything I've seen (apps and scripts) is only interested in providing duplicates.
You can use
comm:The files in the first column are unique to path1, files in the 2nd column are unique to path2, files in the 3rd column are common in both paths. To suppress the first two columns, use
To inspect the whole subtree, use
findinstead ofls, but you need to sort the output: