Search within specified folder gives results but within ‘This Mac’ gives none

search

I type Cmd-F and call up a search window; my search parameters are 'Name contains "xyz"'. Currently the search is limited to the current folder (~/library/preferences) and gives two results. Thinking to widen the search to see what extra files/folders might contain the term 'xyz' in their name I click the button to change the search from 'Preferences' to 'This Mac'. Now the search gives zero results.

Should not the search on 'This Mac' be wider than the folder-specific one? Surely it should, at the very least, return the two results from 'Preferences'?

Can anyone advise on this please?

Extra context: This is on a laptop that is connected to the Internet by wifi, but has no other external devices connected)

Best Answer

By default, Search 'This Mac' excludes System Folders

By starting your search inside ~/Library/ you are forcing it to bypass that default, as you are already inside a normally-excluded location.

To persuade it to add System Folders to a 'This Mac' search, you must specify as an additional parameter.
Click the + sign, top right [which then turns into a - ]
Add 'System files' & 'are included' to your search parameters.

enter image description here