LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 01-20-2005, 08:57 AM   #1
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Rep: Reputation: 30

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.
 
Old 01-20-2005, 09:48 AM   #2
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
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....
 
Old 01-20-2005, 10:10 AM   #3
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Thanks for your reply.

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.
 
Old 01-20-2005, 01:57 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I split your post out of the original (close to two years old) thread.


Cheers,
Tink
 
Old 01-20-2005, 02:31 PM   #5
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
individual crontabs should be somewhere in /var/spool/cron

also, there may be a /etc/crontab which usually just runs each of the scripts in /etc/cron.hourly, /etc/cron.daily, ... etc. at the specified times

so first check each of those locations for a script/command calling updatedb
 
Old 01-20-2005, 02:51 PM   #6
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
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...
 
Old 01-20-2005, 03:34 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Actually just a
chmod a-x /etc/cron.daily/slocate.cron
as root should do ...


Cheers,
Tink
 
Old 01-20-2005, 03:49 PM   #8
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
that sounds likely - just read it with "cat" or "more" to see what it does. then make un-executable as Tinkster said, or you could move it, or delete it, etc.
 
Old 01-20-2005, 06:54 PM   #9
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
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.

Thanks
 
Old 01-20-2005, 08:06 PM   #10
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
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.

--Ian
 
Old 05-06-2005, 04:28 PM   #11
lel800
Member
 
Registered: Aug 2003
Distribution: Red Hat RHEL WS 3, RHEL WS 4
Posts: 228

Original Poster
Rep: Reputation: 30
Good idea. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
comp hangs frequently venkatrao Linux - Software 2 07-07-2005 06:39 AM
Why updatedb is running by itself ??? small_boy22 Slackware 2 05-30-2005 11:10 AM
Why is updatedb running? SheldonPlankton Linux - Newbie 8 12-29-2004 07:15 PM
What's the difference between 'updatedb' and 'updatedb&' ?? DreameR-X Linux - Newbie 4 12-18-2004 04:36 PM
connections drop frequently carmeng Linux - General 1 12-12-2001 05:28 PM


All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration