Linux

  1. Home
  2. Computing & Technology
  3. Linux
photo of Juergen Haas

Juergen's Linux Blog

By Juergen Haas, About.com Guide to Linux since 2003

The find and locate Commands Help You Uncover the Files You are Looking for

Monday March 30, 2009
find is a powerful command line tool for identifying sets of files based on their names. For example the command "find /usr -name *stat" returns every file under the directory "/usr" ending in "stat". More examples on how to use find are presented here.

With locate you can quickly find all files containing a given string. For example, "locate project" lists all files whose name includes "project". However, before you can use locate you have to build the index used by this command. For more information, see here.

With the find and locate commands you can search for files only by their names. If you want to search files by their content you need a desktop search engine such as Beagle or Recoll.

Such search tools enable you to easily find documents, emails, instant messenger conversations, notes, source code, images, etc. Besides the source code, binary installation packages of Beagle are available for most major Linux distros and can be downloaded here. Recoll downloads are available here.

Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss

Community Forum

Explore Linux

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Linux

  1. Home
  2. Computing & Technology
  3. Linux

©2009 About.com, a part of The New York Times Company.

All rights reserved.