Answers:
cron作业在中定义/etc/cron.daily/mlocate
。
要立即运行:
sudo updatedb
或更好
sudo ionice -c3 updatedb
这样做更好,因为updatedb
是在Idle I / O调度类中设置的,因此它不会干扰(从I / O角度而言)其他应用程序。从ionice
手册页:
-c class The scheduling class. 0 for none, 1 for real time, 2 for best-effort, 3 for idle. ........................ Idle A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority argument. Presently, this scheduling class is permitted for an ordinary user (since kernel 2.6.25).