brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: put quotes around words in Spotlight to find that exact phrase

Spotlight
~/tips/tip-spotlight-quotes-exact-phrase

"trip to Paris"

Search for words in that exact order instead of anywhere in a file.

Search for three words in Spotlight and it finds files that contain all three, in any order and anywhere in the text. For a common word or two, that’s a lot of noise.

Put the words in double quotes:

"trip to Paris"
"connection refused"

Apple’s troubleshooting page for unexpected search results says it plainly: to search for an exact phrase, enclose it in quotation marks. Without the quotes, results include items that contain those words in any order.

I find this most useful for error messages and quotes from documents. Search for connection refused without quotes and every file with the word “connection” and the word “refused” somewhere qualifies. With quotes, only the ones where they sit next to each other.

It combines with the other Spotlight tricks. Press Command-2 first to see only files, or start with a keyword such as kind:pdf and then the phrase in quotes.

One limit: the phrase has to be in what Spotlight indexed: text inside a scanned PDF without text recognition, or a file in a folder excluded from Spotlight, won’t match whatever you type.

Further reading: If searching your Mac returns unexpected results (Apple), Narrow your search results in Spotlight on Mac (Apple)

More Spotlight tips mdimport -i ~/Documents/Invoices Command-2 Files double-click backup-2025.zip unpacks it next to the zip Tab show the Quick Actions for that result Results from Apps / System / Clipboard: switch categories off All Spotlight tips (14) All topics

Link