geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


TIP: Locate your files quickly
Databases Posted by Jason on Monday April 09, @07:12PM
from the Hide-and-Seek dept.
FreeBSD comes with a locate database that stores the location of all the files on your system. If you want to find a file very quickly, use the locate command.

Login and type:
locate some_filename

Note:
The locate database is not built by default when you install a system. You will need to build the database before you can use it. Also, the database needs to be refreshed periodically. If you have a system that runs 24/7, the locate database is automatically rebuilt once a week. Otherwise, here is how to do it manually.

Login as root

login: root
password: ********


# /usr/libexec/locate.updatedb

Your locate database is now being rebuilt:
(be patient, this will take a couple of minutes)

When the system finishes, your locate database will be up to date and ready to search.

<  |  >

 

Related Links
  • Articles on Databases
  • Also by Jason
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: TIP: Locate your files quickly
    by Eliena Andrews on Wednesday March 14, @01:17AM
    Hello, After i issue the locate.updatedb command, my system gives me message saying "Executing updatedb as root. This will reveal all filenames on your machine to all login users, which is a security risk." Should i be worried to use this locate.updatedb ?? Best Regards, Eliena Andrews http://visitformoney.blogspot.com
    [ Add a Reply to this ]
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]