Chinaunix
标题:
whereis 和locate使用的是不是同一个数据库,数据库的位置在什么目录下?
[打印本页]
作者:
guoli0813
时间:
2009-09-02 06:35
标题:
whereis 和locate使用的是不是同一个数据库,数据库的位置在什么目录下?
我在做笔记的时候,发现鸟哥私房菜基础版的这里没有明确的讲到我要提的问题,哪儿位老大知道的话,请告知小弟
1.他们是不是使用的同一个数据库。
2.数据库的位置
我使用的是CentOS
作者:
零二年的夏天
时间:
2009-09-02 07:43
还真没有注意过这个问题
作者:
可可火山
时间:
2009-09-02 09:44
这两个命令功能是不一样的。
locate
通过updatedb更新数据库,所以鸟哥提到最新的文件在没更新数据库前得用find命令。
FILES
/var/lib/mlocate/mlocate.db
The database searched by default.
whereis没有数据库的吧,在FILES中找binary, source, and manual page
whereis - locate the binary, source, and manual page files for a command
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}
作者:
emmoblin
时间:
2009-09-02 20:10
whereis的功能好像没有locate强。
而且几乎都是只用locate
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2