How do I get mlocate to only index certain directories?

Posted by Andrew Ferrier on Ask Ubuntu See other posts from Ask Ubuntu or by Andrew Ferrier
Published on 2012-07-06T13:31:25Z Indexed on 2012/07/06 15:23 UTC
Read the original article Hit count: 265

Filed under:
|
|

I'd like to use mlocate on my Ubuntu server, but only to index certain directories (e.g. /home and /data, but not everything under /). However, mlocate's standard configuration works the opposite way; you specify the paths you want to remove (with PRUNE_PATHS).

Is there any easy way to achieve this, or any similar utility that will do what I want? (note: it should maintain an index like mlocate, so find is not acceptable, for example) Thanks.

© Ask Ubuntu or respective owner

Related posts about search

Related posts about find