码迷,mamicode.com
首页 > 其他好文 > 详细

locate 命令

时间:2017-07-22 16:59:53      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:conf   mail   service   没有   master   roo   include   not   ice   

locate 查找包含你想要找的东西

例如:locate  hosts 

[root@master mail]# locate hosts
/etc/hosts
/etc/hosts.allow
/etc/hosts.deny
/etc/selinux/targeted/modules/active/modules/denyhosts.pp
/lib64/security/pam_rhosts.so
/root/.ssh/known_hosts
/usr/share/ghostscript
/usr/share/doc/pam-1.1.1/html/sag-pam_rhosts.html
/usr/share/doc/pam-1.1.1/txts/README.pam_rhosts
/usr/share/doc/vsftpd-2.2.2/EXAMPLE/PER_IP_CONFIG/hosts.allow
/usr/share/ghostscript/conf.d
/usr/share/man/man5/hosts.allow.5.gz
/usr/share/man/man5/hosts.deny.5.gz
/usr/share/man/man5/hosts_access.5.gz
/usr/share/man/man5/hosts_options.5.gz
/usr/share/man/man8/pam_rhosts.8.gz
/usr/share/selinux/devel/include/services/denyhosts.if
/usr/share/selinux/targeted/denyhosts.pp.bz2
/usr/share/vim/vim74/ftplugin/denyhosts.vim
/usr/share/vim/vim74/ftplugin/hostsaccess.vim
/usr/share/vim/vim74/syntax/denyhosts.vim
/usr/share/vim/vim74/syntax/hostsaccess.vim
/var/cache/yum/timedhosts.txt
/var/cache/yum/x86_64/6/timedhosts.txt
[root@master mail]#

 

安装:

yum -y install mlocate

 

安装错误:

  

[root@master mail]# locate hosts
locate: can not stat () `/var/lib/mlocate/mlocate.db‘: 没有那个文件或目录

 

解决办法:

  updatedb

locate 命令

标签:conf   mail   service   没有   master   roo   include   not   ice   

原文地址:http://www.cnblogs.com/yangxiaochu/p/7221574.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!