O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the find Command

The find command is a powerful, flexible way to create a list of files based on filename or part of a name, size, owner, or many other characteristics and combinations of characteristics. The find command not only searches the requested directory, but it also searches all subdirectories. The basic syntax is as follows:

find starting-dir(s) options

See Table 7.5 for other standard properties of the find command:

Table 7.5. Other Properties of the find Command
PropertySee page
Allows output to be piped or redirected116
For the starting directory: 
Allows relative and absolute pathname arguments70
Allows a list of filenames and filename wildcards292

Finding All the Directories That Contain a Given Filename

Start with a simple, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required