locate

Package: WA2L/WinTools 1.2.08
Section: General Commands (1)
Updated: 26 May 2022
Index Return to Main Contents

 

NAME

locate - search files in locate databases

 

SYNOPSIS

WA2LWinTools/bin/locate [ -h | -i | -u | -V | -l | -L ]

locate -c ( database | @group )

locate [ -r ] [ database | @group ] search

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

The locate command allows to quickly search files on the system from the command line or from a spartan GUI (Graphical User Interface).

When the file search is started as GUI, always all available databases are searched, when started from the command line, the database or @group to search can be optionally specified.

To enable to find files, it is needed to frequently update the locate databases which contain the list of files.

To frequently update the database the wscheduler(1) command or a login script can be used for example.

See also NOTES section.

 

OPTIONS

-h
usage message.

-i
install the locate command to the 'Desktop' which allows searching files in all databases.

-u
uninstall the locate shortcut from the 'Desktop'.

-V
print locate version.

-l
list existing and searchable databases of locate in var/db/locate/.

-L
list all defined DATABASEs and @GROUPs in the configuration file.

-c
create/update databases that are used to query and find files.

The DRIVES database automatically contains all logical drives found on the system as returned by the drives(1) command in the console(1m).

-r
print relative path names in search result (default is to print absolute path names).

database
database name where to search file(s). If no database is given, all databases will be searched.

@group
group of databases as defined in the configuration file etc/locate.cfg.

The @ALL group always contains all defined DATABASE entries from the configuration file and can be used to create/update all databases at once (calling locate -c @ALL in wscheduler(1) for example).

search
file search query.

 

ENVIRONMENT

-

 

EXIT STATUS

0
no error.

1
database or @group not defined in the configuration file.

4
usage message displayed.

5
version message displayed.

 

FILES

var/db/locate/DATABASE.locdb
database file that contain the file list that are searched / created by locate.

etc/locate.cfg
configuration file to define the databases in the form:

  DATABASE="d:\dir\sub dir" e:\dir1 LABEL:\dir2

whereas the drives can also be defined as labels (see: lpath(3)) and any environment variable as well as the %INSTALLDIR% and %INSTALLDRIVE% variables can be used

and groups in the form:

  @GROUP=DATABASE1 DATABASE2 DATABASEN

Note that a DATABASE and @GROUP needs to be specified left aligned in upper case. However, on the commandline the names are not case sensitive.

 

EXAMPLES

-

 

SEE ALSO

wintoolsintro(1), config(1m), console(1m), drives(1), iyf(1), locate.cfg(4), lpath(3), searchmyfiles(1), wscheduler(1)

 

NOTES

For a really convenient GUI providing many additional features and also very fast file searching, the use of the iyf(1) command is recommended.

 

BUGS

-

 

AUTHOR

locate was developed by WA2L/WinTools by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2022 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:32:16 GMT, September 14, 2024