locate

locate is a common Unix tool for quickly finding files by name. It offers speed improvements over the find tool by searching a pre-constructed database file, rather than the filesystem directly. The downside of this approach is that changes made since the construction of the database file cannot be detected by locate. This problem can be minimised by scheduled database updates.

mlocate (Merging Locate) is a more secure version of the locate utility, that only shows files accessible to the user.

plocate (Posting Locate) is a locate based on posting lists, consuming mlocate's database ahead-of-time and making a much faster (and smaller) index out of it.

Installation

Install the mlocate or plocate package.

While the GNU findutils also include a locate implementation, Arch's findutils package does not.

Usage

Before can be used, the database will need to be created, this is done with the command, which (as the name suggests) updates the database.

mlocate contains an unit, and plocate contains a unit. These units invoke a database update each day. mlocate enables its timer upon installation. start it manually if you want to use it before reboot. You can also manually run updatedb as root at any time.

To save time, updatedb can be (and by default is) configured to ignore certain filesystems and paths by editing /etc/updatedb.conf. updatedb.conf(5) describes the semantics of this file. It is worth noting that among the paths ignored in the default configuration () are and , so locate may not discover files on external devices.

gollark: Anyone know a good place to ask about this?
gollark: Also, the webserver doesn't seem to show any accesses happening either.
gollark: I still can't figure out why websockets on my site are behaving weirdly with Firefox and it's very annoying. I may still be using them wrong, but wireshark and mitmproxy don't show *any* request happening when Firefox connects, but do show the other requests for content and stuff.
gollark: But they use powers of two, generally, so 2, 4 and 8.
gollark: There are multi-CPU boards, for servers, I guess.

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.