Forrest logo
tool overview
On this page you find all important commands for the CLI tool mdutil. If the command you are looking for is missing please ask our AI.

mdutil

The command line tool "mdutil" is utilized in macOS to manage the metadata indexing of the Spotlight search feature. "mdutil" stands for "metadata utilities."

You can use "mdutil" to check the status of a specified volume's indexing, such as whether indexing is enabled or disabled, and whether it is being ignored for various reasons.

The command "mdutil -s /Volumes/VolumeName" displays the indexing status of the specified volume. If it says "Indexing enabled," then indexing is active on that volume.

To disable indexing for a volume, you can use "mdutil -i off /Volumes/VolumeName." Conversely, to enable indexing, the command "mdutil -i on /Volumes/VolumeName" is employed.

The "mdutil" command also provides an option to modify the indexing schedule for a particular volume using the "-p" flag.

In addition, "mdutil" offers options for forcing indexing to occur immediately ("-E") and for rebuilding the metadata index ("-E -i off && mdutil -E -i on").

List of commands for mdutil:

  • mdutil:tldr:7460c mdutil: Erase the metadata stores and restart the indexing process.
    $ mdutil -E ${path-to-volume}
    try on your machine
    explain this command
  • mdutil:tldr:ecdc9 mdutil: Turn on/off the Spotlight indexing for a given volume.
    $ mdutil -i ${select} ${path-to-volume}
    try on your machine
    explain this command
  • mdutil:tldr:f0bd9 mdutil: Turn on/off indexing for all volumes.
    $ mdutil -a -i ${select}
    try on your machine
    explain this command
  • mdutil:tldr:facbd mdutil: Show the indexing status of the startup volume.
    $ mdutil -s ${-}
    try on your machine
    explain this command
tool overview