[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
jan marco alkema
Thu, 24 Jul 2003 08:50:31 +0200
A colleague of my used to work a lot with the "find" command. Nowadays he
uses only the locate command. It works a lot faster --)
Locate is a tool that put all files on a server in a database. It uses a
daily cron job to update the database.
See http://www.geekreview.org/slocate/ for the source code. It is also in de
Redhat 9 distibution.
In my point of view slocate should be ported to MySQL and linked with the
If someone has better ideas, please let me know ---),
Greetings Jan Marco
Appendix Some readme info of slocate:
II. CREATING THE DATABASE
When creating the database, there are a few options that you may
use to customize which files get indexed and how. The database will be
stored in /var/lib/slocate/. The two main options are:
-u - Indexes every file on your system.
-U <dir> - Indexes every file in the directory <dir>.
Below are some examles of different types of indexing options:
Create an index of everyfile in every directory on your system.
Create an index of everyfile in the specified directory <dir>.
slocate -U <dir>
Create an index of everyfile excluding the specified files/directories,
/proc /dev and /tmp
slocate -e "/proc,/dev/,/tmp" -u
Create an index of everyfile excluding files on NFS and iso9660 type
slocate -f "NFS,iso9660" -u
Create an index of everyfile but do not mark the database as secure.
This will cause slocate to NOT check file permissions before displaying
them to the user. This will allow every user on the system to gain
knowledge of filenames that they would not normally have access to.
The advantage to this option is to make searching faster.
slocate -l0 -u
If you symlinked /usr/local/bin/slocate to /usr/local/bin/updatedb,
the updatedb command will automatically index the root filesystem
at '/'. This will also cause the file '/etc/updatedb.conf' to be
This file is in the same format as the original updatedb.sh