Date: Tue, 5 Mar 1996 21:45:32 +0100 From: Wolfram Schneider <wosch@cs.tu-berlin.de> To: Bruce Evans <bde@zeta.org.au> Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, davidg@freefall.freebsd.org, wosch@cs.tu-berlin.de Subject: Re: cvs commit: src/usr.bin/locate/locate updatedb.csh updatedb.sh Message-ID: <199603052045.VAA00603@campa.panke.de> In-Reply-To: <199603051337.AAA06109@godzilla.zeta.org.au> References: <199603051337.AAA06109@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
>gnu locate supports multiple databases (specified in the environment >variable LOCATE_PATH IIRC). This allows the cdrom databases to be >kept separately and merged when locate is run. I changed my FreeBSD locate to support multiple databases (option or environment). I fixed also broken locate.bigram and locate.code. It works well but I don't think my code style is ready for a commit. Wolfram New options -S Print some statistic about database and exit. -c Suppress normal output; instead print a count of matching file names. -d database Search in database instead the default file name database. Multiple option -d allowed and use different databases Or in other words, the last -d don't overwrite the pre- vious -d database may be a colon-separated list of databases. A single colon is a reference to the default database. $ locate -d ~/lib/mydb: foo search first in ~/lib/mydb and then in /var/db/locate.database. Read from standard input if file name - is given. For example, you can compress your database and use: $ zcat database.gz | locate -d - pattern This maybe useful on machines with fast CPU and few RAM and slow I/O. Note: you can only use *one* pattern for stdin. -i Ignore case distinctions in both the pattern and the database. -l number Limit output to number of file names and exit. -m use mmap(2) instead stdio library, default. In most cases faster. -s use stdio library instead mmap(2).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603052045.VAA00603>