- 论坛徽章:
- 0
|
[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 |
|