---
title: "mac下的Spotlight问题"
author: "zhaoImpulse"
date: "2012-04-16T13:45:10Z"
tags: []
categories: ["操作系统"]
slug: "mac-spotlight"
draft: false
lastmod: "2012-04-16T13:45:10Z"
id: 1487487
url: "https://zhaoimpulse.iteye.com/blog/1487487"
---

sudo mdutil -i off /

该命令用来关闭索引  
sudo mdutil -E /  
该命令用来删除索引  
sudo mdutil -i on /  
该命令用来重建索引

 

但它有时候会出现Spotlight server is disabled.这个问题，那么先cd /System/Library/LaunchDaemons

再sudo launchctl load -w com.apple.metadata.mds.plist，再重复上述操作即可。我也不知道怎么回事