How to Search Inside Files on a Mac: Spotlight, Finder, mdfind and Search by Meaning
Spotlight, the Finder, mdfind and smart folders find words inside your files. What each does well, and how to find a file you can only describe.
Jungle Labs2 min read
On this page2 min left
- Spotlight, the Finder and
mdfindfind a file when you type a word printed in it. - They miss files described in other words, and scans without a text layer.
- Inner Files (our app) searches by meaning, on the Mac.
You remember the plumberâs quote. You donât remember that it is called devis_signed_v3.pdf. macOS can search inside files, as long as you type a word that appears in them.
Spotlight
Press âSpace and type. Spotlight looks at file names and at the text of the documents macOS indexes: PDFs, Pages and Word files, plain text, mail. âReturn shows the result in the Finder instead of opening it, and kind:pdf limits the list to PDFs (Appleâs Spotlight guide).
The Finder and smart folders
âF in a Finder window searches the same index and lists every match with its folder, which you can sort. The + button adds criteria: Kind, Last opened date, Contents.
File âș New Smart Folder keeps a search in the sidebar. It updates itself and moves nothing.
mdfind in Terminal
mdfind "kitchen worktop"lists the files that contain both words.mdfind -onlyin ~/Documents leasesearches one folder.mdfind -name invoicelooks at names only.
When the word isnât in the file
All of these match letters. Pick a search below: two describe the file in other words, one uses words printed in it.
Quote for the renovation of the kitchen: units, worktop, fitting. Total incl. VAT âŹ12,400
Not in the file: last, year
Three cases come up all the time:
- Other words. You type "quote", the PDF says "estimate".
- Scans. A scanned page is an image; without a text layer, the index has nothing to read.
- Another language. You search in English for a letter written in French.
Search by meaning
Inner Files reads the folders you pick, on your Mac: the text of documents, and the text of scans and photos through Appleâs Vision framework. A language model built into macOS then indexes what each passage says. In âK, you describe the file:
âthe kitchen quote from last yearâ, âelectricity billsâ, âscreenshot with a red chartââŠ
The same index answers questions, and every answer points to the file and page it comes from:
Search by meaning is free in two folders. A one-time purchase opens it to all of them. Nothing is sent anywhere.
At a glance
| Tool | Text inside files | Finds by description | Scans and images | Saved search | Price |
|---|---|---|---|---|---|
| Spotlight | Yes | No | Recent macOS | No | Free |
| Finder | Yes | No | Recent macOS | Smart folders | Free |
| mdfind | Yes | No | Same as Spotlight | In a script | Free |
| Inner Files | Yes | Yes | Yes, read on the Mac | Smart collections | Free in 2 folders, then paid once |
Questions
- How do I search for text inside files on a Mac?
- Press Command-Space and type a word from the document. Spotlight searches the names and the text of the files macOS indexes, PDFs and office documents included. In a Finder window, Command-F searches the same index and lists every result with its folder.
- Why doesnât Spotlight find a file I know is there?
- Spotlight needs the words you type to be written in the file. It misses a document described in other words, a scan without a text layer, and anything in a folder excluded in Spotlightâs privacy settings.
- Can I search my Mac by describing a file?
- Not with the built-in tools. Inner Files indexes what your documents say, on your Mac, so a description such as the kitchen quote from last year finds an estimate that never uses the word quote.