No 'locate' cmd?

I like to use the ‘locate’ cmd to search for files. I can never get ‘find’ to work, and ‘locate’ always does… at least on other Linux OS’s.

Then install it.

pamac install mlocate

Yes, the package is called mlocate.


Most official ISOs have findutils to provide /usr/bin/find

But only Xfce ISO includes mlocate to provide /usr/bin/locate

Manjaro extra repository also has plocate

1 Like

I dont know what your issues are with find.
Its what I use for most things.

It may also be worth noting that find and locate work a bit differently.

Syntax of course … but the main point would be that locate uses a constructed database …
This requires some extra resources, but should return speed improvements over find.
It can also mean that the database is incorrect - locate may return invalid results depending on the validity of the db.*

I will also mention the difference of plocate and mlocate

  • mlocate should only return files accessible by the user.

  • plocate converts the locate db into an index that purports to be smaller and faster.

* - This can be mitigated by making sure to updatedb. The 2 packages also offer 2 different timers for this purpose. updatedb.timer (mlocate) and plocate-updatedb.timer (plocate)

1 Like

plocate nvim  1 ✘
pread: Short read (file corrupted?)

Did you start one of the timers and/or update the db as mentioned above ?

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.