我正在 Mac(Catalina,10.15.7)上工作并且想要使用locate <...>- 命令。输入后,locate ...它向我建议了以下内容,我就这样做了。
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.
Run Code Online (Sandbox Code Playgroud)
创建数据库后,我想执行locate-命令。这没有按预期工作。相反,出现了这样的情况:
locate: locate database header corrupt, bigram char outside 0, 32-127: -1
Run Code Online (Sandbox Code Playgroud)
我可以做什么来解决这个问题?非常感谢你的帮助。