- 论坛徽章:
- 0
|
原帖由 12909708 于 2007-6-27 10:19 发表于 1楼
看书上说这个两个命令都是基于对数据库的查询,locate的数据库文件为/var/lib/slocate/slocate.db,那whereis的库文件是哪个?还是两个命令用的是一个库文件?他们两个库文件默认更新的周期是多久?
1. locate 是讀取 database file,可以透過 updatedb 更新。至於多久更新,要看你的 linux 發行版本在 crontab 內設定多久跑 updatedb
2. whereis 尋找依據標準,請閱讀 manpage:
- FILES
- /{bin,sbin,etc}
- /usr/{lib,bin,old,new,local,games,include,etc,src,man,sbin,X386,TeX,g++-include}
- /usr/local/{X386,TeX,X11,include,lib,man,etc,bin,games,emacs}
- BUGS
- whereis has a hard-coded path, so may not always find what you're looking for.
复制代码
-- |
|