O'Reilly logo

Practical Linux by Bill Ball, John Ray, Michael Turner, M. Drew Streib

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

Finding Files and Directories

Although navigating your disk's directories and listing directory contents can be helpful for finding needed files, Linux comes with several search utilities that will work much faster. The following sections demonstrate how to use several of these commands to quickly and efficiently find files or directories.

Finding Files with the find Command

The find command is used to search all mounted file systems for the name or partial name of a file or directory. This powerful command can be used to do much more than simply find files. To search for files or directories, specify a search path and search pattern on the command line, like so:

$ find  /usr -name *emacs -xdev

As shown in the following, this search of the /usr ...

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