Folks, does anybody understand how the Finder (= Spotlight) search really works?
Test 1
I have created the following test
files and folders in my $HOME:
~/
|- test0/ - regular folder
|- test1.txt - hidden with `chflags hidden test1.txt`
|- .test2.txt - dot file
|- .test3/ - dot folder
|- test4.txt - regular file
If I open Finder and look for test
, the test1.txt
file is successfully found (despite it is hidden!) without any tweaks (fig. 1).
But there is no way — at least, I didn’t figured it out myself yet — to show .test2.txt
, .test3
and test4.txt
. At first glance, the solution is easy: click a search criteria, select “Other”, there enable the “File invisible” check box, then add it as a new criteria (fig. 2).
But this doesn’t help. And even worse, even test1.txt
is not found then. In fact, this option seems to broke any search — no matter which files you tried to search, the search won’t find anything.
Test 2
I have a test file called foo
in my /usr/local/bin
. Finder cannot find it, even if (the same as the second step in Test 1) I will add “System files” criteria (fig. 3).
Questions
- Q1: Does it work the same for you?
- Q2: Is it a known bug? If “yes”, could you provide a link?
- Q3: Is there a fix or workaround for this? I’m not afraid of using command line.
Thanks in advance!
Yes I know about third-party search utilis. Please don’t mention them, let’s keep this topic focused.