Redian新闻
>
mac下的 locate命令问题。。
avatar
h*y
2
我用/usr/libexec/locate.updatedb 建立了搜索数据库,
但似乎只能搜到某些文件。。
可是很多文件找不到。。比如我们home目录下完全搜不到。。
为什么啊
记得以前是好使的
avatar
c*a
3
更新不及时,最新的文件找不到

【在 h**********y 的大作中提到】
: 我用/usr/libexec/locate.updatedb 建立了搜索数据库,
: 但似乎只能搜到某些文件。。
: 可是很多文件找不到。。比如我们home目录下完全搜不到。。
: 为什么啊
: 记得以前是好使的

avatar
h*y
4
不是。才更新过。
而且不是部分找不到。是基本都找不到

【在 c*****a 的大作中提到】
: 更新不及时,最新的文件找不到
avatar
f*u
5
贴下locate命令的帮助最后一段。你需要关注的是第一和第二条。
$man locate
...
BUGS
The locate program may fail to list some files that are present, or may
list files that have been removed from the system. This is because locate
only reports files that are present in the database, which is typically only
regenerated once a week by the /System/Library/LaunchDaemons/com.apple.
locate.plist job. Use find(1) to locate files that are of a more transitory
nature.
The locate database is typically built by user ``nobody'' and the
locate.updatedb(8) utility skips directories which are not readable for user
``nobody'', group ``nobody'', or world. For example, if your HOME
directory is not world-readable, none of your files are in the database.
The locate database is not byte order independent. It is not possible
to share the databases between machines with different byte order. The
current locate implementation understands databases in host byte order or
network byte order if both architectures use the same integer size. So on a
FreeBSD/i386 machine (little endian), you can read a locate database which
was built on SunOS/sparc machine (big endian, net).
The locate utility does not recognize multibyte characters.
avatar
j*I
6
这个第二条是所有unix locate的bug还是apple locate的bug?

may
only
transitory

【在 f****u 的大作中提到】
: 贴下locate命令的帮助最后一段。你需要关注的是第一和第二条。
: $man locate
: ...
: BUGS
: The locate program may fail to list some files that are present, or may
: list files that have been removed from the system. This is because locate
: only reports files that are present in the database, which is typically only
: regenerated once a week by the /System/Library/LaunchDaemons/com.apple.
: locate.plist job. Use find(1) to locate files that are of a more transitory
: nature.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。