Chapter 10. The find Command


Chapter 10. 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 things with find that aren't possible with locate.

Throughout this chapter, we look for files on an external hard drive that contains music mounted at /media/music. You can see that find allows us to slice and dice the files in a variety of ways.



Linux Phrasebook
Linux Phrasebook
ISBN: 0672328380
EAN: 2147483647
Year: 2007
Pages: 288

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net