Mac File Search: Master Spotlight, mdfind and the Tools Beyond
Last updated: · written by the FileLocator team
Mac file search starts from a better place than Windows: Spotlight indexes file contents out of the box, Finder can save searches as living folders, and the whole index is queryable from Terminal. The catch is that Apple hides nearly all of this power behind an empty search box. Spotlight has a real query language — type filters, date operators, boolean logic — and macOS ships a command-line search engine (mdfind) most Mac users have never run.
This hub covers the full stack: Spotlight done properly, Finder smart folders, Terminal search, fixing a broken index, and the honest state of third-party Mac search tools — including where the Mac ecosystem is thinner than Windows', and what to do about it.
built in
Spotlight, properly
Press Cmd+Space and Spotlight opens. Most people type a word, scan the jumble of apps, web suggestions and files, and give up. The fix is telling Spotlight exactly what you mean with operators typed straight into the search field:
kind:narrows by file type:kind:pdf,kind:image,kind:folder,kind:email,kind:presentation. Soinvoice kind:pdfskips every app and email called "invoice" and shows only PDFs.date:filters by date:date:today,date:yesterday,date:this week. Combine:report kind:pdf date:this month.name:matches the filename only, ignoring contents — crucial, because by default Spotlight matches text inside files, which is why a search for "budget" returns documents that merely mention the word.- Exact phrases go in quotes:
"quarterly board review"matches that phrase, not three scattered words. - Boolean operators —
AND,OR,NOT, in capitals — combine conditions:kind:pdf NOT name:draft, ortax OR invoice kind:pdf. A minus sign also works for exclusion:budget -2024.
Two settings worth checking in System Settings → Siri & Spotlight: untick result categories you never want (Siri Suggestions and websites top the list), and review the Spotlight Privacy exclusion list at the bottom — a folder in that list is completely invisible to every Spotlight-based tool, which is a common cause of "the file doesn't exist" mysteries.
reusable searches
Finder search and smart folders
Spotlight is for quick lookups; Finder search (Cmd+F in any Finder window) is where you build precise queries. Two things to know immediately:
- Check the scope bar. Under the search field, Finder offers "This Mac" vs the current folder. It defaults to This Mac, which is rarely what you want when you pressed
Cmd+Finside a project folder. (You can change the default in Finder Settings → Advanced.) - Stack criteria rows. Click the + button on the right of the search bar to add rule rows: Kind is PDF, Last modified date is within last 7 days, File size is greater than 100 MB, Name contains "v2". Click the criterion dropdown and choose Other… to unlock dozens more attributes — pixel dimensions, authors, duration, tags.
The underused gem is the Save button: it turns your query into a smart folder — a saved search that updates itself every time you open it. A smart folder for "files modified in the last 3 days," one for "PDFs over 50 MB," one for "screenshots older than a month" — each is a one-time setup that replaces a recurring hunt. They pair beautifully with a sane naming scheme; see our folder structure guide for conventions that make every search sharper, and our recently modified files guide for more date-filter recipes across platforms.
terminal power
mdfind: Spotlight in the Terminal
Everything Spotlight knows is queryable from the command line with mdfind — same index, zero UI, scriptable output. The essentials:
# Anything matching a word (filenames AND contents)
mdfind "quarterly report"
# Filename-only search
mdfind -name budget.xlsx
# Limit the search to one folder tree
mdfind -onlyin ~/Documents "insurance claim"
# Live mode: keep printing new matches as they appear
mdfind -live "invoice"
The real power is raw metadata queries against Spotlight's attribute database. Every indexed file carries kMDItem attributes you can filter on:
# All PDFs modified in the last 7 days, under ~/Documents
mdfind -onlyin ~/Documents 'kMDItemContentType == "com.adobe.pdf" && kMDItemFSContentChangeDate >= $time.today(-7)'
# Images wider than 4000 pixels
mdfind 'kMDItemPixelWidth > 4000'
# Files authored by a specific person
mdfind 'kMDItemAuthors == "*Sarah*"'
To discover which attributes a file has, point mdls at it:
mdls ~/Documents/contract.pdf
That dumps every attribute Spotlight stored — content type, page count, authors, dates — each one a hook for an mdfind query. If terms like metadata or index need unpacking, our glossary defines them in plain English.
troubleshooting
Rebuilding the Spotlight index
When Spotlight can't find files you know exist, returns ancient results, or mds_stores sits at high CPU for days, rebuild the index. Two routes:
The System Settings trick. Open System Settings → Siri & Spotlight, scroll to Spotlight Privacy…, and drag your hard drive (or the misbehaving folder) into the exclusion list. Wait a minute — this deletes its index — then select it and click − to remove it. Spotlight re-indexes the location from scratch.
The Terminal route. Faster to type, same effect:
# Erase and rebuild the index for the boot volume
sudo mdutil -E /
# Check indexing status
mdutil -s /
# Rebuild just one external drive
sudo mdutil -E /Volumes/ExternalDrive
Expect the rebuild to run from twenty minutes to a few hours depending on disk size, with patchy search results until it finishes. If Spotlight still misses files afterwards, check the Privacy exclusion list and whether the file type has a Spotlight importer at all — or skip the index entirely with EasyFind, below.
go further
Third-party Mac search tools
Honesty first: the Mac search-tool ecosystem is thinner than Windows'. There's no true Everything equivalent, because macOS doesn't expose a file-system catalog the way NTFS exposes its Master File Table — and most of the tools we review in depth on this site are Windows software. That said, the Mac options that exist are good:
Raycast and Alfred — launcher-style search. Both replace Cmd+Space with a faster, more controllable launcher whose file search queries the Spotlight index underneath. Raycast's core is free and feels modern; Alfred's serious file features (file actions, custom search scopes, workflows) need the paid Powerpack. If your complaint is Spotlight's interface rather than its index, either one solves it.
HoudahSpot — the power front-end. HoudahSpot (paid, with a trial) is the closest thing to a professional search application on the Mac: a column-based query builder over the Spotlight index with saved templates, result refinement, and every kMDItem attribute exposed in a GUI. It can only find what Spotlight has indexed — but it makes what Spotlight knows fully usable.
EasyFind — the no-index brute-forcer. Free and tiny, EasyFind ignores the Spotlight index and scans the file system directly. That makes it slow on a full disk — minutes, not milliseconds — but it finds what Spotlight hides: files in excluded locations, invisible files, package contents, things the index lost. Keep it around as your court of last resort.
Find Any File — fast attribute search. Another index-free scanner (small one-time price), searching by name, dates and size with a handy hierarchical results view. Like EasyFind, it trades speed for completeness and works on drives Spotlight won't touch.
Best file search software
Our full ranking — including which picks work on a Mac and which are Windows-only.
DocFetcher review
The open-source content-search tool that runs on macOS as well as Windows and Linux.
Search inside PDFs
Full-text PDF search on any platform — including OCR for scanned documents.
content search
Searching inside files on a Mac
Spotlight already indexes the text of PDFs, Office and iWork documents, email and notes, so plain searches match file contents by default — ahead of Windows' out-of-box behavior. The gaps appear at the edges:
- Scanned PDFs are images, not text, until they've been through OCR. No search tool on any platform can read them before that — our guide to searching inside PDFs covers the OCR workflow.
- Cross-platform or portable indexing. If you need a content index you control — specific folders, exotic file types, a portable index you can move between machines — the open-source DocFetcher runs on macOS (it's Java-based) and indexes Office files, PDFs and more on your terms.
- Duplicates and clutter are a search problem in disguise: every duplicate is a wrong answer waiting to be opened. Our duplicate files guide covers Mac-friendly approaches, and you can audit any single folder right in your browser with our free File Finder tool — nothing gets uploaded.
For quick answers to one-off questions — external drives, Time Machine volumes, search shortcuts — check the FAQ, which links each answer to a deeper guide. And if you also run a PC, our list of the best free file search tools shows what the Windows side offers for nothing.
questions
Mac file search FAQ
Why can't Spotlight find a file I know exists?
Four usual reasons: the file lives in a location Spotlight excludes (external drives can be excluded by default, and anything listed under Spotlight Privacy is invisible); the index is stale or corrupted and needs a rebuild; the file type has no Spotlight importer so its contents were never indexed; or Spotlight is ranking it so far down you never see it. A rebuild with sudo mdutil -E / fixes the stale-index case, and EasyFind finds the file regardless because it skips the index entirely.
How do I rebuild the Spotlight index on a Mac?
Two ways. The GUI way: System Settings, then Siri and Spotlight, then Spotlight Privacy; drag your drive into the exclusion list, wait a minute, and remove it again, which forces a full re-index. The Terminal way: run sudo mdutil -E / to erase and rebuild the index for the boot volume. Either way, expect indexing to take from twenty minutes to a few hours depending on how much is on the disk, with reduced search results until it finishes.
What is the Mac equivalent of Everything for Windows?
There is no exact equivalent, because macOS does not expose its file system catalog the way NTFS exposes the Master File Table. The closest experiences are HoudahSpot, which puts a fast power-search interface on top of the existing Spotlight index, and Find Any File or EasyFind, which scan the file system directly without an index. They find everything, including files Spotlight hides, but a full-disk scan takes minutes rather than milliseconds.
Can the Mac search inside PDFs and documents?
Yes. Spotlight indexes the text content of PDFs, Office documents, iWork files, email and more out of the box, so a plain Spotlight or Finder search already matches words inside files. The big exception is scanned PDFs that are just images of text; those need OCR before any search tool can read them. Our PDF search guide covers the OCR step.
Is Raycast or Alfred better for file search?
For pure file search they are close, because both query the same Spotlight index underneath. Raycast is free for the core features and feels more modern; Alfred's full file-search power, including file actions and custom search scopes, sits behind the paid Powerpack. If file search is your main use, try Raycast first since it costs nothing; if you want deep customization and workflows, Alfred still has the edge.
Comparing tools across platforms?
Our master roundup ranks 10 search tools and flags exactly which ones run on macOS.
keep exploring
Related reading
Find recently modified files
Date filters in Finder and Spotlight, mdfind recipes, and the Windows equivalents.
Find duplicate files
Safe, step-by-step duplicate hunting on Mac and Windows — without deleting the wrong copy.
Organize your folder structure
Naming conventions and folder systems that make every future search faster.