Is there a way to search for an exact phrase using the mdfind
utility? For example, I created two text documents titled "test1" and "test2". The contents of "test1" are:
I love Apple
And the contents of "test2" are:
Apple love I
When I type this in terminal (I placed both files in ~/Documents):
mdfind "I love Apple" -onlyin ~/Documents
I get:
~/Documents/test1.txt
~/Documents/test2.txt
How would I search for the exact phrase "I love Apple" so mdfind
only returns results containing those words in that order (in this case only "test1.txt")?