Unix/Linux Go Back    

OpenDarwin 7.2.1 - man page for locate (opendarwin section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

LOCATE(1)			   BSD 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 data-
     base is recomputed periodically, and contains the pathnames of all files which are publicly

     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*''.


     -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 data-
	   base.  The environment variable LOCATE_PATH has the same effect.

     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.

     /var/db/locate.database	   Default database
     /usr/libexec/locate.updatedb  Script to update database.

     find(1), fnmatch(3), weekly.conf(5)

     Woods, James A., "Finding Files Fast", ;login, 8:1, pp. 8-10, 1983.

     The locate command appeared in 4.4BSD.

BSD					  April 5, 2003 				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 07:06 PM.