O'Reilly logo

Linux Annoyances for Geeks by Michael Jang

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

I Don't Remember Where That File Is

With the thousands of files available on a Linux computer, people need help finding files now and then. For geeks, the two basic tools are find and locate. For regular users, there are KDE and GNOME search tools that are frontends to the find and locate commands.

The first part of this annoyance is a review of these commands for geeks. The second part covers the KDE and GNOME tools that your users will demand on their workstations. The key difference between these tools is that by default, the GNOME Search for Files tool uses locate, and the KDE Find Files tool uses find. As you should already know as a Linux geek, while locate works more quickly, it is less reliable than find.

The find Command

The find command is rich and complex. While I cannot cover everything that you can do with find, this book would not be complete without a discussion of it. If you need more information, refer to a book such as Unix Power Tools by Shelley Powers et al. (O'Reilly). The basic format of the find command is as follows:

find path operators

When you run this command, the path is the directory in which find should start looking. In other words, if you set the path to /home/michael, find looks in that directory and its subdirectories. It does not move up the directory tree. With the right operators, you can specify limitations, such as the file owner.

With the following examples, I describe some of the ways you can use the find command. In current Linux distributions, ...

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