請問一下,
apt-get 可以每天定期自動更新嗎?
要打什麼樣指令才能自動更新呢?
因為我每天要處理的事情很多,
怕會忘了要去做更新的動作,
若能有個定時自動去更新的指令是最好了,
但我一直找不到文件?
煩請各位幫忙解惑, 謝謝!!
版主: 阿信
$ apt-cache show cron-apt
Package: cron-apt
Priority: optional
Section: admin
Installed-Size: 88
Maintainer: Ola Lundqvist <opal@debian.org>
Architecture: all
Version: 0.4.8
Depends: apt, debianutils (>= 1.7)
Recommends: liblockfile1, mailx
Filename: pool/main/c/cron-apt/cron-apt_0.4.8_all.deb
Size: 21768
MD5sum: df1a9f4f5f1279c9c05729eba954c2dd
SHA1: 316553cdbb077a7c17aebb85812e7081fbff9e6f
SHA256: c1d29f7570c136eda239abcadbd8f03200ea5d15c3a58358ce9ab53d5df82389
Description: automatic update of packages using apt-get
Contains a tool that is run by a cron job at regular intervals. By default it
just updates the package list and download new packages without installing.
You can instruct it to run anything that you can do with apt-get
(or aptitude).
.
It can optionally sends mail to the system administrator on errors, log
to syslog or a separate log file.
.
Observe that this tool may be a security risk, so you should not set it
to do more than necessary. Automatic upgrade of all packages is NOT
recommended unless you are in full control of the package repository.
Tag: admin::package-management, interface::daemon, role::sw:server, suite::debian, use::downloading, works-with::software:package
silaslin 寫:可以在 /etc/cron.daily 中建立一個 script
例如 daily-update.sh
內容如下:
#!/bin/bash
aptitude update
aptitude upgrade
然後將 daily-update.sh 改為可執行檔即可
chmod +x daily-update.sh
正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客