由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Apple版 - mac下的 locate命令问题。。
相关主题
Mac如果开启远程登录,最好更新一下openssh,替换系统自带[转载] Mac OS X terms and definitions
Yosemite Single User Mode 与 launchdRe: 给我一个喜欢apple的理由
fcitx for Mac OS X扫盲一下:MacOSX(FreeBSD/Darwin)!=Linux!=UNIX
解决啦!!!!!Re: 紧急, urgent!!!Re: 基于 Google AppEngine 的中文手写识别
对了,为ipad开发程序难不难?Those stupid Apple Fanboys (转载)
随着os4的退出MAC OS X 是开源的么? 我感觉不是,如果真的不是的话,为什么不遵守GPL 呢?
MacOS X on AMD chip (2)谁给写一个port darwin的howto?
正式报个到黑客说果粉其实真的很无知
相关话题的讨论汇总
话题: locate话题: files话题: database话题: byte话题: order
进入Apple版参与讨论
1 (共1页)
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.

1 (共1页)
进入Apple版参与讨论
相关主题
黑客说果粉其实真的很无知对了,为ipad开发程序难不难?
在国内使用Ipad问题请教随着os4的退出
有人用chrome的么?感觉比safari顺畅MacOS X on AMD chip (2)
Jobs的原话正式报个到
Mac如果开启远程登录,最好更新一下openssh,替换系统自带[转载] Mac OS X terms and definitions
Yosemite Single User Mode 与 launchdRe: 给我一个喜欢apple的理由
fcitx for Mac OS X扫盲一下:MacOSX(FreeBSD/Darwin)!=Linux!=UNIX
解决啦!!!!!Re: 紧急, urgent!!!Re: 基于 Google AppEngine 的中文手写识别
相关话题的讨论汇总
话题: locate话题: files话题: database话题: byte话题: order