Since I changed the directory structures of my Mac, Spotlight has not successfully produced search results for my files or folders.
I have tried
- Killing SystemUIServer
- Rebuilding the Spotlight Index manually using
sudo mdutil -E /
- Changing Desktop Resolution
Clear caches and preferences using downloaded application
- Rebooting Mac
All suggested in this to no effect. 4th item was recommended against on Apple Support Community. And of course, I tried what was suggested by seaturtle.. reindexing Macintosh HD.
Using terminal with the right keywords, the files/folders come up, but I would like to fix permanently.
Has anyone got other idea? Kindly let me know.
- I currently use Macbook Pro of 2012, OS: High Sierra 10.13.2
Best Answer
Can you wait for Spotlight to reindex your machine?
If so, try this:
Can't wait (or don't want to use Spotlight)?
Try this Terminal command to search by name. Any
'
s should be replaced with'\''
, because otherwise they would end the quoted string.Searching by file contents is trickier, and will only work for plain text files. Try this:
What does this all mean?
~
– your home folder-iname
– tellsfind
to do a case-insensitive search by filename'xyz'
– single quotes prevent characters like Space,(
or)
, etc. from being interpreted by the shell*whatever*
– the*
s mean "any number of characters can go here". Otherwise,find
would only search for files named exactly "whatever".-iRIl
:-i
– case-insensitive-R
– recursive (search subfolders too)-I
– ignore files that aren't plain text-l
– list files, but don't display matching lines