I am trying to find out where a file is located. I know the name of this file, but when using Spotlight search for my.cnf, it only list files located in Documents. None of the other files on my Mac are returned in the search results, but I know they exist.

I am searching my entire hard drive. (Macintosh HD)

I have used advanced Spotlight search options to include even if File Invisible (tried it both checked and unchecked). But it still does not return files in the system part of the drive.

example of a file that IS NOT returned in Spotlight: /usr/local/Cellar/[email protected]/5.7.34/.bottle/etc/my.cnf

How to I get Spotlight search to return ALL files?

enter image description here

I am running Mac OS Big Sur 11.5.6.

  • Is the file itself invisible, or just in a System area?
    – Tetsujin
    Commented Oct 14, 2022 at 13:48
  • @Tetsujin - The file itself is not hidden, but the folder it's in is. /usr/local/Cellar/[email protected]/5.7.34 Commented Oct 14, 2022 at 13:49

1 Answer 1


If the file isn't actually invisible but just inside a System area, you need to switch on System files - are included. [If not already visible in your Search options, you can switch it on the same way as you did File Invisible.]

enter image description here

You can't do this from a regular Cmd/Space search, but you can from Finder search. Here's a composite image showing it finding files in usr/local/bin

enter image description here

Visible files in this case isn't strictly needed, just System files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .