mdutil

From RaySoft

The mdutil command is useful for managing the metadata stores for mounted volumes.[1]

Documentation

Syntax

mdutil [PARAMETER ...] MOUNTPOINT ...

Parameters

-d
Disables Spotlight searches on the provided volume.
-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:
The indexing may be delayed due to low disk space or other conditions.
-s
Display the indexing status of the listed volumes.

Examples

Never ever index my backup disk again!
sudo mdutil -d -E -i 'off' '/Volumes/Backup_No.1'

References

  1. man 1 'mdutil'