## Locate files and binaries on a system ##

[Author](authors.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

[Reviewer](technical_reviewers.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

[Reviewer](technical_reviewers.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

----



### Concept ###

Be able to quickly find the location of
any file on the system as needed and know which utilities can be used
to find binaries, source, manpages and files. In addition,
be able to update the locate(1)(((locate))) database.

### Introduction ###


<!-- /var/db/locate.database -->

By default, this database is built every Saturday.
(See section [[Configure_the_scripts_that_run_periodically_to_perform_various_system_maintenance_tasks]] for details on weekly maintenance tasks.)

<!-- /usr/libexec/locate.updatedb -->

TODO: show how to manually build this database

If you want to find a file in real-time, you can use the `find` command.
More information, and examples of using `find` is covered in section [[Find_a_file_with_a_given_set_of_attributes]].


SUGGESTION: consider mentioning locate and how to force immediate population of the locate database on a freshly install system without waiting for an overnight cron job 

SUGGESTION consider mentioning which as a method to discover locations of installed applications; this is especially useful on an unfamiliar system which might have multiple versions of a major program installed (such as an instance of gcc4 under /usr/local to complement the default gcc3 -- note that DragonFly supports a dual gcc setup); it might not hurt to mention echo $PATH as a way to gain a quick insight on a system's binary layout

### Examples ###


### Practice Exercises ###


### More information ###

whatis(1); whereis(1); which(1); locate(1); find(1); sh(1) including
"type" built-in, -v and -V; locate.updatedb(8) or
locate.conf(5)


