Introduction

In general, there are two commands that can help you find files and directories: the find and locate commands.

The find command - find in real time

You can use find command to find files and directories in real time. The syntax for find is:

find [path...] [expression]

The details about find is covered in find command.

The locate command - a fast find

The locate command is similar to the find command in that you can tell it what to look for, and it will return a list of results that match your search pattern much faster. However, it does the lookup in the index, so what you need to know about locate is that the results are not in real time. There is a lag between the time that the index gets created and the time that you run the locate command. The syntax for locate is:

locate pattern

The details about locate is covered in locate command.

References & Resources