A) This will output all the *.JPG
and *.flac
files recursively:
$ find . -type f -name "*.JPG" -o -name "*.flac"
Output includes: 1 JPG document and 254 flac documents
B) This will output only *.flac
files recursively:
$ find . -type f -name "*.flac"
Output includes: 218 flac documents
I would assume all *.flac
files listed with those two commands would match the exact same amount of files for each of those. The only difference would be that the first command would include *.JPG
on top of all *.flac files, right? Not exactly. In case you are an iTunes user, you may be familiar with @eadir
directories. Surprisingly, the first command will include even *.flac
files within those @eadir
directories (36 *.flac
files), but the second command will not.
Why do those two commands return different results for the same file type?