LOCATE(1) | General Commands Manual | LOCATE(1) |
locate
— find
files
locate |
[-d dbpath]
pattern |
locate
searches a database for all
pathnames which match the specified pattern. The
database is recomputed periodically, and contains the pathnames of all files
which are publicly accessible.
Shell globbing and quoting characters (``*'', ``?'', ``\'', ``['' and ``]'') may be used in pattern, although they will have to be escaped from the shell. Preceding any character with a backslash (``\'') eliminates any special meaning which it may have. The matching differs in that no characters must be matched explicitly, including slashes (``/'').
As a special case, a pattern containing no globbing characters (``foo'') is matched as though it were ``*foo*''.
Options:
-d
dbpathlocate
exits with a 0 if a match is found,
and >0 if no match is found or if another problem (such as a missing or
corrupted database file) is encountered.
find(1), fnmatch(3), locate.conf(5), weekly.conf(5), locate.updatedb(8)
Woods, James A., Finding Files Fast, ;login, 8:1, pp. 8-10, 1983.
The locate
command appeared in
4.4BSD.
April 19, 2004 | NetBSD 10.99 |