Home : Linux : Commands : Linux Commands : locate

locate command

(Locate files)

Secure Locate provides a secure way to index and quickly search for files on your system. It uses incremental encoding to compress its database to make searching faster, but it will also store file permissions and ownership so that users will not see files they do not have access to.

Although locate can be used to create databases to your design, at this stage you will probably only need to use locate to find files.

In its simplest form, locate can be used as follows....

>locate httpd

This will produce a list of all files and directories with httpd in the name. Although using locate in this manner is rather like using a sledgehammer to bang in a thumb tack, is can be useful to a linux novice when trying to find files. You may find however, that the listing you get it far too long to be of any use. If you are looking for the location of something specific - such as the perl executable, you may be better off using which to find it.

Back to Command Index