On Sun, Feb 13, 2011 at 5:52 PM, Peng Yu <pengyu...@gmail.com> wrote: > Hi, > > The manpage of updatedb only shows the case when one source directory > is used. But I have multiple directories need to be indexed. Is there > a way to do so in updatedb? > > updatedb -l 0 -o db_file -U source_directory
I believe the simplest way to do this is to build one locate database for each top-level directory (you should be able to run two instances of updatedb in parallel) and set $LOCATE_PATH to a string which includes both databases. An alternative would be to start updatedb at a start point above both trees, and configure it to prune out all the other directories, but that's probably cumbersome. James.