mdutil
Manage the metadata stores used by Spotlight for indexing. tldr-pages
On macOS
macOS
Show the indexing status of the startup volume
mdutil -s /IdentifyTurn on/off the Spotlight indexing for a given volume
mdutil -i on path/to/volumeIdentifyTurn on/off indexing for all volumes
mdutil -a -i onIdentifyErase the metadata stores and restart the indexing process
mdutil -E path/to/volumeIdentify