Unix and Linux Discussions Tagged with locate |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
7 |
5,735 |
OS X (Apple) |
|
|
|
4 |
3,930 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,666 |
Homework & Coursework Questions |
|
|
|
16 |
3,262 |
Shell Programming and Scripting |
|
|
|
4 |
4,979 |
Linux |
|
|
|
2 |
105,537 |
Ubuntu |
|
|
|
1 |
4,435 |
UNIX and Linux Applications |
|
|
|
5 |
2,523 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,324 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,846 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
75,925 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,903 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,991 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
27,172 |
Programming |
|
|
|
1 |
3,470 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,752 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,234 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
4,057 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
7,357 |
UNIX for Dummies Questions & Answers |
LOCATE(1) BSD General Commands Manual LOCATE(1)
NAME
locate -- find files
SYNOPSIS
locate [-d dbpath] pattern
DESCRIPTION
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 dbpath
Sets the list of databases to search to dbpath which can name one or more database files separated by ``:'', an empty component in the
list represents the default database. The environment variable LOCATE_PATH has the same effect.
EXIT STATUS
locate 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.
FILES
/var/db/locate.database Default database
/usr/libexec/locate.updatedb Script to update database.
SEE ALSO
find(1), fnmatch(3), weekly.conf(5)
Woods, James A., "Finding Files Fast", ;login, 8:1, pp. 8-10, 1983.
HISTORY
The locate command appeared in 4.4BSD.
BSD
April 5, 2003 BSD