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.
It seems like updatedb runs more than once every 24 hours. And I know I just don't create many files on this computer in that space of time. So I would like to disable updatedb as a cron job and only run it manually when I need to. Is this possible and if so how? I appreciate any feedback.
Personal (user) cron jobs can be found with the command "crontab -e". Check to see jobs type "crontab -l" (but if this is a root user specified command, it'll show up). If the system is causing this then it probably lies elsewhere....
In the shell I entered "crontab -e" and the output included "no crontab". Then in the shell I entered "crotab -l" and the result was similar "no crontab". So I guess this is a system level cron job. If anyone has any thoughts about how I can go about dissabling this root/system cron so that updatedb only runs when I manually execute "updatedb" in the shell I'd appreciate it. Thanks again.
Thanks for your response. I looked inside the directory "/etc/cron.daily" and I see a file "slocate.cron" and I think that might be it. Is it safe to switch to root user and delete this file.. Would that do the trick.. Is that the right file...
I took a look at the file with vi and I could see that indeed it did run
updatedb with parameters and so forth, so I took the suggestion by Tinkster to
change the permissions on the file making it non executable. That seems like
it should work. And the advantage is it will be easy enough to change the
executable state back in case I wish updatedb to be resumed as a cron job.
So I'll say "Thanks" assuming it did work and if updatedb keeps
running I'll check back in and ask more questions.
Distribution: Ubuntu, Debian, Various using VMWare
I know you said that you wanted to run updatedb manually, but perhaps you could move the updatedb.cron script to cron.weekly or cron.monthly. Then it would still run occasionally, and you would , of course, be able to run updatedb manually when you want.