This command will force spotlight to reindex your drive. It is useful if your spotlight index isnt returning results you know it should. This post will help you force spotlight to reindex either your whole machine, or a specific folder.
open applications > terminal:
sudo mdutil -E /
You can force spotlight to reindex specific folders if you only want the results updated from a single location (eg your documents folder)
sudo mdutil -E /path/to/folder
You can view a full list of flags available in mdutil with the command
Here is a copy of the flags from mdutil:
The mdutil command is useful for managing the metadata stores for mounted volumes. The following options are available: -p Spotlight caches indexes of some network devices locally. This option requests that a local caches be flushed to the appropriate network device. -E This flag will cause each local store for the volumes indicated to be erased. The stores will be rebuilt if appropriate. -i on | off Sets the indexing status for the provided volumes to on or off. Note that indexing may be delayed due to low disk space or other conditions. -d Disables Spotlight searches on the provided volume. -s Display the indexing status of the listed volumes. -a Apply command to all volumes. -v Print verbose information when available.
There is a second method for this, as outlined in the apple support guide
No related posts.