locate
From Mac Guides
Revision as of 19:45, 10 June 2008; Eraserhead (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
locate is a Terminal command which acts as a very fast file locater. locate is faster than Spotlight if you know the filename, but does not search contents. It simply returns a list of every file in the system that matches the given pattern.
[edit]
Examples
To locate Apache's configuration file:
locate httpd.conf
To locate any file even remotely connected with iChat, which are very many (localization files, histories...).
locate iChat
[edit]
Man Page Excerpt
locate searches a database for all pathnames which match the specified pattern. The database is recomputed periodically, and contains the path- names 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 (``/).
[edit]

