Problem
无法在Finder还是Alfred中,都无法搜索到一个已经存在的文件。
Solution
Solution 1
1.关闭聚焦(spotlight)
sudo mdutil -a -i off
2.不加载控制聚焦参数的文件
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
3.重新加载控制聚焦参数的文件
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
4.打开聚焦
sudo mdutil -a -i on
Solution 2
sudo mdutil -E /
这里 -E
表示”Erase and rebuild index”(删除并重建索引),/
表示从 root 目录开始(重建所有文件夹的索引)
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper