Files

How to Find a File on Mac: Spotlight, Finder and Terminal

Nemo · · 4 min read

The fastest way to find a file on a Mac is Spotlight. Press Cmd+Space, type part of the file’s name and press Return to open it, or Cmd+Return to show it in Finder. When you need more control (only PDFs, only this week, only one folder), use Finder’s search with Cmd+F. When you know the path, Go to Folder (Cmd+Shift+G) beats both. And from a terminal, mdfind and find do the same jobs in text.

Which method should you use?

You know Use Keys
Part of the name Spotlight Cmd+Space, type, Return
The name, plus a kind or a date Finder search Cmd+F in a Finder window
The folder path Go to Folder Cmd+Shift+G in Finder
Words inside the file Spotlight or mdfind Cmd+Space, or mdfind "words"
The name, and you are in a shell mdfind -name or find See below

How do you find a file with Spotlight?

Press Cmd+Space (or click the magnifying glass in the menu bar) and type. Spotlight searches file names and, for most file types, the text inside them. The top hit opens with Return. Three keys make it more useful:

  • Cmd+Return shows the selected file in Finder instead of opening it.
  • Holding Cmd shows the file’s path at the bottom of the preview.
  • Arrow keys move through the results; the right side previews the file.

If a folder never shows up in Spotlight, check System Settings, Spotlight, and the list of locations Spotlight is told to skip.

How do you search in Finder?

Open a Finder window and press Cmd+F. Type a name, then choose where to search (“This Mac” or the current folder) in the bar under the toolbar. Click the plus button to add rules: Kind is PDF, Last modified date is within the last 7 days, Name contains “invoice”. Finder offers to save the search as a Smart Folder, which stays up to date on its own.

A tip that saves time: when Finder suggests “Name matches: report” as you type, pick it. That limits the search to file names, not every document that mentions the word.

How do you jump to a folder you know?

In Finder, press Cmd+Shift+G and type a path such as ~/Library/Application Support. Tab completes folder names as you go. This is the quickest way into hidden folders, which Finder doesn’t show by default; our guide to showing hidden files on a Mac covers the rest.

How do you find a file from the terminal?

Spotlight has a command line twin, mdfind, which uses the same index, so it answers quickly:

mdfind -name invoice              # file names containing "invoice"
mdfind -onlyin ~/Documents report # anything mentioning "report" in Documents

find walks the folders itself. It is slower but sees everything, including places Spotlight skips:

find ~ -iname "*invoice*.pdf" 2>/dev/null

-iname ignores case, and 2>/dev/null hides “Permission denied” noise. Both commands are covered with others in our list of Mac terminal commands, and how to open the terminal shows every way in.

What if you only remember using it recently?

Then skip searching. Finder’s sidebar has Recents, which lists the files you opened lately, newest first. Most apps also keep their own list under File, Open Recent, and the Apple menu has Recent Items. For a file that came from the web, look in Downloads first: in Finder, Option+Cmd+L opens it directly.

How will Monok find files?

Monok is a browser with a built-in terminal, so mdfind works in a terminal pane. Since version 0.1.1 it also has Files, a native file manager pane, and finding is built into the same Magic Bar you already use for pages and commands:

  • Type / and a name, such as /invoice, and the Magic Bar lists matching files and folders from your home folder, found by Spotlight.
  • Type /~/Documents/ or //Applications/ and it completes the path as you type.
  • Press Enter on a folder and it opens in a Files pane; Enter on a file opens it in its default app.

Nothing opens until you press Enter or click. The landing page has a screenshot.

FAQ

Why can’t Spotlight find my file?

The folder may be excluded in Spotlight’s settings, the disk may still be indexing, or the file sits in a hidden or system folder. find in the terminal searches without the index.

How do I find where a file is saved?

Select it in Spotlight and press Cmd+Return to reveal it in Finder.

Can I search only file names in Finder?

Yes. Type the name in Finder’s search field and choose “Name matches” from the suggestions, or add a “Name contains” rule.

Does Monok have a file manager yet?

Yes, since version 0.1.1. Download it for macOS 14 or later.

More in Files

Contact

Bug reports, sites you want to see working, ideas. We reply by email.