11. The find Command
In the last chapter, we covered commands that let you search for files (locate) and data within files (grep). The third command in the powerful triumvirate is find. While locate searches a database for files, which makes it fast but dependent upon a constantly updated database, find searches for files on the fly using criteria that you specify. Since find has to parse through your file structure, it’s much slower than locate, but you can do lots of things with find that aren’t possible with locate.
Throughout this chapter, we’re going to work on an external hard drive that contains music and related files and is mounted at /media/music. Also notice that there are spaces in the filenames, which explains the quotation marks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access