LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   updatedb / locate doesn't appear to work (https://www.linuxquestions.org/questions/linux-software-2/updatedb-locate-doesn%27t-appear-to-work-357856/)

allelopath 08-28-2005 03:19 PM

updatedb / locate doesn't appear to work
 
locate is not finding files that i know are there.
i've done an updatedb.
i've tried it both as root and as a regular user.

the files are on a hard drive at /mnt/bdrive/this/that/and/so/on

is there something special i must do with files under /mnt/?

Poetics 08-28-2005 03:30 PM

I don't know if updatedb will scan mounted devices; I don't think it'd index removable media. It'd be great if someone can confirm or deny this.

allelopath 08-28-2005 03:46 PM

according to this:
http://wiki.linuxquestions.org/wiki/Updatedb
you have to explicitly _exclude_ /mnt if you don't want it

bigrigdriver 08-28-2005 10:18 PM

It's quite simple, really. If you want partitions and devices such as zip/cd media included in the locatedb, the partitions must be mounted at the time updatedb is run; the media must be in the drive and mounted if you want it (them) included in the locatedb.

Having said that, if you want files from /mnt/bdrive/this/that/and/so/on included in the locatedb, then /mnt/bdrive must be mounted when the updatedb command is run. If it is not mounted, updatedb won't see it, and won't include it in the locatedb.

Tinkster 08-28-2005 10:32 PM

Quote:

Originally posted by allelopath
according to this:
http://wiki.linuxquestions.org/wiki/Updatedb
you have to explicitly _exclude_ /mnt if you don't want it

Please note that there's TWO DIFFERENT tools out
there. There's locate/updatedb and slocate/updatedb.

The latter uses a configuration file (/etc/updatedb.conf) and
in the distros that I've come across /mnt is in the PRUNE_PATH
section, which means that updatedb won't touch it.


Cheers,
Tink

allelopath 08-28-2005 10:55 PM

Suse doesn't have slocate, darnit.
I see that KDE has a front end called klocate, but when i try to install that rpm, i end up in dependency hell.


All times are GMT -5. The time now is 06:50 AM.