免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 996 | 回复: 0
打印 上一主题 下一主题

locate [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-02 21:10 |只看该作者 |倒序浏览
[root@RHEL4 ~]# locate passwd
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
Please have a look at /etc/updatedb.conf to enable the daily cron job.
[root@RHEL4 ~]# vi /etc/updatedb.conf
# To enable the updatedb in cron, set DAILY_UPDATE to yes
DAILY_UPDATE=no
PRUNEFS="sysfs selinuxfs usbdevfs devpts NFS nfs afs sfs proc smbfs cifs autofs auto iso9660 udf"
PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /net /sfs /selinux /udev /mnt/floppy"
export PRUNEFS
export PRUNEPATHS
~
~
"/etc/updatedb.conf" 7L, 286C written                        
[root@RHEL4 ~]# locate
Secure Locate 2.7 - Released January 24, 2003
Copyright (c) 1999, 2000, 2001 Kevin Lindsay & Netnation Communications Inc. &
James A. Woods
search usage:   locate [-qi] [-d ] [--database=] ...
                locate [-r ] [--regexp=]
database usage: locate [-qv] [-o ] [--output=]
                locate [-e ] [-f  ] [-l ]
                       [-c] ] [-u]>
general usage:  locate [-Vh] [--version] [--help]
   Options:
  -u                 - Create slocate database starting at path /.
   -U            - Create slocate database starting at path .
   -c                 - Parse original GNU Locate's '/etc/updatedb.conf'
                        when using the -u or -U options.  If 'updatedb' is
                        symbolically linked to the 'locate' binary, the
                        original configuration file will automatically be
                        used.
   -e  - Exclude directories from the slocate database when
                        using the -u or -U options.
   -f   - Exclude file system types from the slocate database
                        when using the -u or -U options. (ie. NFS, etc).
   -l          - Security level.
                           0 turns security checks off. This will make
                             searchs faster.
                           1 turns security checks on. This is the default.
   -q                 - Quiet mode.  Error messages are suppressed.
   -n            - Limit the amount of results shown to .
   -i                 - Does a case insensitive search.
   -r
   --regexp=  - Search the database using a basic POSIX regular
                        expression.
   -o
   --output=    - Specifies the database to create.
   -d
   --database=  - Specfies the path of databases to search in.
   -h
   --help             - Display this help.
   -v
   --verbose          - Verbose mode. Display files when creating database.
   -V
   --version          - Display version.
Author: Kevin Lindsay
Bugs:   
klindsay@mkintraweb.com
FTP:   
ftp://ftp.geekreview.org/slocate/
        
ftp://ftp.mkintraweb.com/pub/linux/slocate/
HTTP:   
http://www.geekreview.org/slocate/
[root@RHEL4 ~]# locate -u
[root@RHEL4 ~]# locate apropos
/usr/bin/apropos
/usr/share/man/ko/man1/apropos.1.gz
/usr/share/man/en/man1/apropos.1.gz
/usr/share/man/it/man1/apropos.1.gz
/usr/share/man/hr/man1/apropos.1.gz
/usr/share/man/man1/apropos.1.gz
/usr/share/man/ro/man1/apropos.1.gz
/usr/share/man/pt/man1/apropos.1.gz
/usr/share/man/ja/man1/apropos.1.gz
/usr/share/man/fi/man1/apropos.1.gz
/usr/share/man/nl/man1/apropos.1.gz
/usr/share/man/sl/man1/apropos.1.gz
/usr/share/man/bg/man1/apropos.1.gz
/usr/share/man/fr/man1/apropos.1.gz
/usr/share/man/el/man1/apropos.1.gz
/usr/share/man/de/man1/apropos.1.gz
/usr/share/man/cs/man1/apropos.1.gz
/usr/share/man/da/man1/apropos.1.gz
/usr/share/man/es/man1/apropos.1.gz
/usr/share/man/pl/man1/apropos.1.gz


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/26090/showart_413502.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP