Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm on a redhat derivative now, and in mine the package is called slocate, not locate. Try yum install slocate and see if that helps.
I'm not too sure on this next bit, but I think yum search locate will search through the repos and give you all the package names where the text 'locate' is found. Or maybe its yum list locate.
The package name is either "slocate" (old) "mlocate" (new). You can find it by browsing the repo (mirror) or through Pbone, Rpmfind or your favourite searchengine. What repos are configured in /etc/yum.repo.d/ for your machine and what CentOS version are you using?
this will tell you whether locate or slocate RPM is installed in your machine. I believe it's not installed and in that case try installing the package either from web or from the media from where you have installed your OS.
Check out this site....most probably you will get the package you are searching for
You've now got locate installed, but you haven't built a database. You need 'updatedb' to do this (probably need to be root to do it).
Just for your further information, you could be more helpful when you are saying that something doesn't work. For example, you could include whether there was any output when you ran the rpm commands and not just what happened when you tried to run the final command itself.
No, 'whereis' doesn't use a database like 'locate' or 'whatis' slash 'apropos'. I think it would be good for you to read Rute and the CentOS Deployment docs (the Deployment_Guide-en-US-5.2-11.el5 package contents). Much basic info there.
Some of the hints are better and some are not, so here is a summary about locate:
- The command name is still "locate"
- But when you install it, you need to install it with "yum install mlocate" command
- After that either wait for tomorrow :-) or give command "updatedb". This collects folder and file names to a database, which is the reason everyone wants to use locate instead of find: it is dozens of times faster.
And no need to do:
- Check your cronjobs - you will just find the updatedb command from there.
- Do RPM installation - if you use yum, then it will do the installation always as well