在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
MacOS下更新locate数据库
本文介绍了在MacOS系统中如何解决locate命令无法找到文件的问题,并提供了创建和更新locate数据库的方法。
1605

被折叠的 条评论
为什么被折叠?



