Score:0

I cannot find the file /var/lib/mlocate.db

io flag

I have Ubuntu 22.04.2 LTS installed on my Raspberry Pi and I try to find/open the file /var/lib/mlocate.db but I cannot find it.

I installed locate package.

It's because I'm doing an online course from Linux Professional Institute (LPI) and I read this passage:

One problem with locate is that it only shows entries present in the database generated by updatedb (located in /var/lib/mlocate.db). If the database is outdated, the output could show files that have been deleted since the last time it was updated. One way to avoid this is to add the -e parameter, which will make it check to see if the file still exists before showing it on the output.

So I would like to see the database.

HuHa avatar
es flag
That database is updated with a cron job / systemd timer. You can either wait for a day for that job to run, or start it manually (`sudo updatedb`). See `man locatedb` for documentation about the format. It's binary, so opening it with a text editor won't be very useful.
chili555 avatar
cn flag
Did you install mlocate or plocate? If the latter, please run: `sudo updatedb` and then check /var/lib/plocate/plocate.db.
hr flag
AFAIK Ubuntu now uses `plocate` as the default - see [Jammy Jellyfish Release Notes](https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668)
Chookitypok avatar
io flag
Thank you @HuHa @chili555 and @steeldriver. Yes with Ubuntu version 22.04.2 LTS (Jammy Jellyfish), I installed plocate (not mlocate) so the binary file ``/var/lib/mlocate.db`` referred in the LPI passage in my question, its equivalent for plocate is located there ``/var/lib/plocate/plocate.db``.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.