locate (Unix)
   HOME

TheInfoList



OR:

locate is a
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
utility which serves to find
file File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to ''remove'' fine amounts of material from a workpiece **Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to gent ...
s on
filesystem In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is Computer data storage, stored and retrieved. Without a file system, data placed in a storage me ...
s. It searches through a prebuilt
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
of files generated by the updatedb command or by a
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and Greek mythology, mythology and of later Hellenistic religion and Hell ...
and compressed using
incremental encoding Incremental encoding, also known as front compression, back compression, or front coding, is a type of delta encoding compression algorithm whereby common prefixes or suffixes and their lengths are recorded so that they need not be duplicated. This ...
. It operates significantly faster than
find Find, FIND or Finding may refer to: Computing * find (Unix), a command on UNIX platforms * find (Windows), a command on DOS/Windows platforms Books * ''The Find'' (2010), by Kathy Page * ''The Find'' (2014), by William Hope Hodgson Film and t ...
, but requires regular updating of the database. This sacrifices overall efficiency (because of the regular interrogation of filesystems even when no user needs information) and absolute accuracy (since the database does not update in real time) for significant speed improvements, particularly on very large filesystems. locate was first created in 1982. The BSD and
GNU Findutils A number of notable software packages were developed for, or are maintained by, the Free Software Foundation as part of the GNU Project. What it means to be a GNU package Summarising the situation in 2013, Richard Stallman identified nine aspects ...
versions derive from the original implementation. Their primary database is world-readable, so the index is built as an unprivileged user. locate command is also included in
MacOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
. mlocate (Merging Locate) and the earlier slocate (Secure Locate) use a restricted-access database, only showing filenames accessible to the user.


See also

* mdfind related command in MacOS


References


External links


GNU Findutils

mlocate
* * * Variants:
plocate
- Variant faster than mlocate, with a smaller index.
rlocate
- Variant using kernel module and daemon for continuous updates.
KwickFind
- KDE GUI frontend for locate * Locate32 for Windows - GPL'ed graphical Windows variant (no longer available) GNU Project software Unix file system-related software Information retrieval systems {{Unix-stub