4 ms·
The system `updatedb` job (that creates the database `locate` uses) only scans one root tree. This one root tree includes lots of random junk (basically your en
by brbsix 11y ago
The system `updatedb` job (that creates the database `locate` uses) only scans one root tree. This one root tree includes lots of random junk (basically your entire filesystem minus a few things) and does not support multiple filesystems/root trees. Hence the necessity to create multiple databases. I agree it's pretty silly.
- tgflynn 11y ago"does not support multiple filesystems/root trees." I just tried the experiment on Ubuntu 14.04 and that statement does not appear to be true. If I create a file on a mounted non-root filesystem then run updatedb followed by locate with a pattern matching that filename I get the file's path. There are a couple of things that could be preventing this in /etc/updatedb.conf. Make sure the mounted filesystem isn't excluded by PRUNEPATHS or PRUNEFS. Also I'm not clear on what PRUNE_BIND_MOUNTS does but my guess is that if set to yes it would exclude nfs mounted filesystems.
- brbsix 11y agoI was incorrect. It does support other mounted filesystems, just not multiple root trees. As you suspected, `updatedb.conf` had /media in PRUNEPATH.