Linux

Linux Problem Solving: locate

So, I've been working with setting up a virtual environment on a server at work that I can use for development. Particularly, I'm using it to do my testing and work on Ubercart in Drupal 6. While I enjoy learning new things, the whole experience has been quite a hassle. My container kept hitting a memory limit (which I thought was sufficient) every time I tried to install something new with yum, causing things to go awry. It's been a long two days.

Anyways, I just figured I'd share solutions to difficulties I encounter in case anyone else out there has the same troubles. Smiling

This post will briefly cover the locate command. I'm quite green when it comes to grokking the file structure of a Linux install. Not a huge deal... I should be able to find anything I want with the locate command. Unfortunately, I kept running into this wall...

[ryan@ryan ~]# locate httpd.conf
locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory

My server admin didn't have any quick ideas, but Google usually turns up nice results. Eye-wink I found a few pages with tips, and the second one did the trick. I have to run updatedb to build that database. I recommend running it as a background process, since it may take a while for the initial construction... I believe it has to index all the files on disk.

There... I hope that helps someone else and saves them some frustration. Cool

Syndicate content