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.
sudo updatedb
). Seeman locatedb
for documentation about the format. It's binary, so opening it with a text editor won't be very useful. – HuHa Mar 21 '23 at 19:40sudo updatedb
and then check /var/lib/plocate/plocate.db. – chili555 Mar 21 '23 at 19:43plocate
as the default - see Jammy Jellyfish Release Notes – steeldriver Mar 21 '23 at 19:58/var/lib/mlocate.db
referred in the LPI passage in my question, its equivalent for plocate is located there/var/lib/plocate/plocate.db
. – Chookitypok Mar 24 '23 at 13:41