Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

danev375

macrumors newbie
Original poster
Jul 17, 2022
13
4
Recently searched for a file known to be in ~/Library/Preferences/ (while in OS 10.15), and got no results. Same in 10.11. (But worked in 10.6.)

Files within other "system" folders can be located, and results were always set to "include System Files" and "Visible OR Invisible" and standard troubleshooting like forced re-indexing had been done.

If you navigate to the Preferences folder, the files exist and are displayed.
Both Spotlight and 'mdfind' in Terminal did not locate such files.
But 'find' in terminal did in 10.11, as did 'sudo find' in 10.15.

Seems like files in /Library/Preferences are not seen by Spotlight, as well.

com.apple.dock.plist is a randomly selected example file name seen here in both the /Library/Preferences/ and ~/Library/Preferences/ folders, in both 10.11 and 10.15. But Spotlight only reported the copy of it in /System/Library/LaunchAgents/.
 

elptdbi3lYI

macrumors 6502
Mar 26, 2021
320
275
I have encountered this issue/feature in less expected way, I have created directory named Library in another volume to store data, and then spent few hours troubleshooting why my files are not getting indexed. So, yeah, you don't want to name your custom directories "Library".
 

zevrix

macrumors 6502
Oct 10, 2012
417
237
same issue here on 13.5 IF I search "This Mac": spotlight doesn't find files in the Preferences folder.

however, it does find the file if you open the Preferences folder and search "Preferences".

spotlight can be unreliable mess. will need to report this bug to Apple.
 

danev375

macrumors newbie
Original poster
Jul 17, 2022
13
4
Most interesting.
In my OSs (so far) only the Preferences folder within Library is at question - files in other folders within Library are returned in results.

And somewhat annoying.
When searching directly from the Preferences Window, as remarked above, the file did indeed show up:
- It was amusing then to toggle from "Search: Preferences" to "Search: This Mac" and see the searched-for file disappear from the search results.
- If the additional setting "include System Files" was enabled, that file still was displayed in the result.
- But it disappeared from the results if "Visible OR Invisible" was selected.
 
  • Like
Reactions: zevrix
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.