1. Computing

Discuss in my forum

Juergen Haas

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

By March 30, 2009

Follow me on:

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.

No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
  1. About.com
  2. Computing
  3. Linux

©2014 About.com. All rights reserved.