*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> locate (1)              



NAME    [Toc]    [Back]

       locate - list files in databases that match a pattern

SYNOPSIS    [Toc]    [Back]

       locate  [-d  path  | --database=path] [-e | --existing] [-i | --ignorecase
 ] [--version] [--help] pattern...

DESCRIPTION    [Toc]    [Back]

       This manual page documents the GNU version of locate.  For  each  given
       pattern,  locate  searches one or more databases of file names and displays
 the file names that contain the pattern.	Patterns  can  contain
       shell-style  metacharacters: `*', `?', and `[]'.  The metacharacters do
       not treat `/' or `.'  specially.  Therefore, a  pattern	`foo*bar'  can
       match  a file name that contains `foo3/bar', and a pattern `*duck*' can
       match a file name that contains `lake/.ducky'.  Patterns  that  contain
       metacharacters  should  be quoted to protect them from expansion by the

       If a pattern is a plain string --  it  contains	no  metacharacters  --
       locate displays all file names in the database that contain that string
       anywhere.  If a pattern does contain metacharacters, locate  only  displays
 file names 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 file name.

       The file name databases contain lists of files that were on the	system
       when  the  databases  were  last updated.  The system administrator can
       choose the file name of the default database, the frequency with  which
       the  databases  are updated, and the directories for which they contain
       entries; see updatedb(1L).

OPTIONS    [Toc]    [Back]

       -d path, --database=path
	      Instead of searching the default file name database, search  the
	      file  name databases in path, which is a colon-separated list of
	      database file names.  You can also use the environment  variable
	      LOCATE_PATH  to  set  the list of database files to search.  The
	      option overrides the environment variable if both are used.

       The file name database format changed starting with GNU find and locate
       version	4.0 to allow machines with diffent byte orderings to share the
       databases.  This version of locate can automatically recognize and read
       databases produced for older versions of GNU locate or Unix versions of
       locate or find.

       -e, --existing
	      Only print out such names that currently exist (instead of  such
	      names  that  existed  when the database was created).  Note that
	      this may slow down the program a lot, if there are many  matches
	      in the database.

       -i, --ignore-case
	      Ignore case distinctions in both the pattern and the file names.

       --help Print a summary of the options to locate and exit.

	      Print the version number of locate and exit.

ENVIRONMENT    [Toc]    [Back]

	      Colon-separated list of databases to search.

SEE ALSO    [Toc]    [Back]

       find(1L), locatedb(5L), updatedb(1L), xargs(1L) Finding Files  (on-line
       in Info, or printed)

[ Back ]
 Similar pages
Name OS Title
list_directory HP-UX Displays a list of all the directories whose names match the specified directory name
list_clearinghouse HP-UX Displays a list of all the clearinghouses whose names match the specified clearinghouse name
glxchoosefbconfigsgix IRIX return a list of GLX frame buffer configurations that match the specified attributes
csa_list_entries HP-UX list the calendar entries that match all the attribute search criteria
list_link HP-UX Displays a list of all the soft links whose names match the link name that you specify
glxchoosefbconfig IRIX return a list of GLX frame buffer configurations that match the specified attributes
glob IRIX Return names of files that match patterns
dsfmgr Tru64 Manages device special files in the /dev directory and their associated databases
list_child HP-UX Displays a list of all the child pointers whose names match the specified child name
changelist OpenBSD list of backup files
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service