h**********y 发帖数: 1293 | 1 我用/usr/libexec/locate.updatedb 建立了搜索数据库,
但似乎只能搜到某些文件。。
可是很多文件找不到。。比如我们home目录下完全搜不到。。
为什么啊
记得以前是好使的 | c*****a 发帖数: 1046 | 2 更新不及时,最新的文件找不到
【在 h**********y 的大作中提到】 : 我用/usr/libexec/locate.updatedb 建立了搜索数据库, : 但似乎只能搜到某些文件。。 : 可是很多文件找不到。。比如我们home目录下完全搜不到。。 : 为什么啊 : 记得以前是好使的
| h**********y 发帖数: 1293 | 3 不是。才更新过。
而且不是部分找不到。是基本都找不到
【在 c*****a 的大作中提到】 : 更新不及时,最新的文件找不到
| f****u 发帖数: 219 | 4 贴下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. | j*****I 发帖数: 2626 | 5 这个第二条是所有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.
|
|