Manages multiple mlocate databases. Update them separately, or several at a time. Search one or all.
Planed are two tools: mkdb, dblookup they are analogous to updatedb and locate.
-
mkdb dbname path1 path2 ...
Runs mkdir -p ${LOCATEDIR}/{path1,path2,..}
updatedb -o $LOCATEDIR/path1/mlocate.db -U path1
updatedb -o $LOCATEDIR/path2/mlocate.db -U path2
...for each path
Adds to the database the assoction dbname-> [path1,path2,...]
The database definition file is $LOCATEDIR/dblookp.ht. -
dblookup dbname seachspec...
Looks for matches to searchspec in mlocate databases associated with dbname.
- Configuration is handled by Config.hs.
- The locate database(s) name-to-files mapping is in the file
$prefix/lib/db/dblookup/dblookup.ht - dblookup analizes the locate databases in ($prefix/lib/db/**/dblookup.db) at runtime to determine if they are mlocate or plocate databases.
- NOTE: /etc/updatedb.conf still controls what updatedb does.
mkdb is now functional
$ ./mkdb bin /bin /usr/bin ~/bin /sbin /usr/lucho/*bin
updatedb -o /var/lib/mlocate/bin/mlocate.db -U /bin
updatedb -o /var/lib/mlocate/usr/bin/mlocate.db -U /usr/bin
updatedb -o /var/lib/mlocate/export/home/frayser/bin/mlocate.db -U /export/home/frayser/bin
updatedb -o /var/lib/mlocate/sbin/mlocate.db -U /sbin
updatedb -o /var/lib/mlocate/usr/lucho/bin/mlocate.db -U /usr/lucho/bin
updatedb -o /var/lib/mlocate/usr/lucho/sbin/mlocate.db -U /usr/lucho/sbin