40 lines
1.4 KiB
Groff
40 lines
1.4 KiB
Groff
.TH LOCATE 1
|
|
.SH NAME
|
|
locate \- list files in a database that match a pattern
|
|
.SH SYNOPSIS
|
|
.B locate
|
|
pattern...
|
|
.SH DESCRIPTION
|
|
This manual page
|
|
documents the GNU version of
|
|
.BR locate .
|
|
For each given pattern,
|
|
.B locate
|
|
searches a database of file pathnames and displays the pathnames that
|
|
contain the pattern. Patterns can contain shell-style metacharacters:
|
|
`*', `?', and `[]'. The metacharacters do not treat `/' or `.'
|
|
specially. Patterns that contain metacharacters should be quoted to
|
|
protect them from expansion by the shell.
|
|
.LP
|
|
If a pattern is a plain string \(em it contains no metacharacters \(em
|
|
.B locate
|
|
displays all pathnames in the database that contain that string
|
|
anywhere. If a pattern does contain metacharacters, it only displays
|
|
pathnames that match the pattern exactly. As a result, patterns that
|
|
contain metacharacters should usually begin with a `*', and will
|
|
most often end with one as well. The exceptions are patterns that are
|
|
intended to explicitly match the beginning or end of a pathname.
|
|
.LP
|
|
The database contains a list of the files that were on the system
|
|
whenever the database was last updated.
|
|
The frequency with which the database is updated and the directories
|
|
for which it contains entries are configurable by the system
|
|
administrator.
|
|
.LP
|
|
If the environment variable
|
|
.B LOCATE_DB
|
|
is set,
|
|
.B locate
|
|
uses it as the path of the filename database instead of the
|
|
compiled-in path.
|