0

On my MBP running Mojave (with SSD drive), I noticed that when searching for a file using mdfind utility I get different results than when doing the same search from Finder. No location/path restrictions were used.

Can someone explain to me how this could be? The results should have been 3 .odt files and 1 .mp3 but mdfind only lists the .odt files.

Reindexing fixed the problem. How can I prevent this from happening again? Is there some regular maintenance task I could run to make sure the index is up to date? Or do I simply force a reindex once a week?

Thanks.


EDIT: The names of the files I was searching start with 6182.

The search from the Terminal was:

$ mdfind -name 6182

As for Finder, I just entered 6182 and made sure This Mac was selected.

  • Vic, you'd have to be more specific about your queries into mdfind and Spotlight. And there's no way to know without more information whether your system isn't indexing properly. If it happens again maybe ask for help narrowing down what the issue actually is. I've seen different results and then later realized it had more to do with how I was querying and was expected behaviour, but I didn't realize it at the time. – Harv Feb 16 at 9:58
  • @harv I've edited my question but there is really not much more I can give you. – Vic Feb 16 at 13:38

You must log in to answer this question.

Browse other questions tagged .