在ubuntu中是updatedb,mac中没发现这个命令,试着运行了下locate xxx,出现如下提示:
$ locate "*.mp3"
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
Oh, I see.第二次应该不会提示了吧,记下来以备不时之需。
更新这个locate:/usr/libexec/locate.updatedb