Chapter 7. find Command

find Overview

find Overview

The general format of the find command is as follows:

find path operators

path is the directory in which find will begin a search. operators are one or more of the many find options you specify. The end of this section contains a list of commonly used operators to find. We’ll work with several of the most commonly used operators in some of the upcoming examples.

The most common result of find is to produce a list of files. You can produce a list of files in the current working directory, specified by a dot (.), and print those files, as shown in the following example:

# cd /home 
# 
# ls -l total 3 drwxr-xr-x 3 ...

Get UNIX® User’s Handbook, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.