定位名称不起作用

reb*_*ked 6 locate

有一个文件/user/share/jogl.jar

我在用 locate jogl.jar

但它不起作用。为什么?

Ale*_*lex 8

从手册页:

   locate  reads  one or more databases prepared by updatedb(8) and writes
   file names matching at least one of the PATTERNs  to  standard  output,
   one per line.
Run Code Online (Sandbox Code Playgroud)

updatedb以 root 身份运行并重试。它应该工作。

或者,您可以使用findor find | grep,它不使用数据库(因此速度相当慢)。