Forrest logo
back to the mdutil tool

mdutil:tldr:7460c

mdutil: Erase the metadata stores and restart the indexing process.
$ mdutil -E ${path-to-volume}
try on your machine

The command "mdutil -E ${path-to-volume}" is used to rebuild the metadata (or index) of a specific volume on a macOS system.

Here's a breakdown of the different parts of the command:

  1. "mdutil" refers to the "metadata utility" in macOS, which is responsible for managing and querying the metadata indexes for various files and folders.

  2. "-E" is an option for the "mdutil" command, which stands for "enable indexing" or "rebuild index." This option specifies that the metadata index for the given volume should be rebuilt. It essentially forces macOS to reindex the files and folders on that volume.

  3. "${path-to-volume}" is a placeholder for the actual path to the volume you want to rebuild the metadata index for. You need to replace this placeholder with the actual path to the volume on your system. For example, if you want to rebuild the index for a volume named "Macintosh HD," you would replace "${path-to-volume}" with "/Volumes/Macintosh HD".

In summary, when you execute the "mdutil -E ${path-to-volume}" command, it tells macOS to rebuild the metadata index for the specified volume, helping improve the efficiency and accuracy of searches and queries on that volume.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mdutil tool