Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looks like it's not configurable through /etc/updatedb.conf, and not mentioned in its manual as well.

So can I change that?

share|improve this question
Which distrib? What have you tried? Did you read /usr/share/doc? – F. Hauri Jan 12 '13 at 13:43
@F.Hauri only read man update.conf – warl0ck Jan 12 '13 at 14:12
up vote 4 down vote accepted

You should probably know that mlocate only does queries on the databases created by updatedb. If you want to change the default location of the databases created by updatedb you should pass the --output FILE option to updatedb and then do the query with locate --database FILE afterwards.

You could do:

$ sudo updatedb -o /var/db/foo.db
$ locate -d /var/db/foo.db something
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.