我的 ubuntu 20.04 有問題 我的 /vat/log/journal 成長到 195G。當我執行命令時,$tail -f /var/log/syslog
我看到重複的日誌,我認為這是我的問題。
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Invalid password
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: The Secure Boot key you've entered is not
valid. The password used must be
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: between 8 and 16 characters.
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Enter a password for Secure Boot. It will
be asked again after a reboot.
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Enter the same password again to verify
you have typed it correctly.
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Invalid password
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: The Secure Boot key you've entered is not
valid. The password used must be
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: between 8 and 16 characters.
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Enter a password for Secure Boot. It will
be asked again after a reboot.
Sep 20 19:45:11 fanapsoft vboxdrv.sh[6730]: Enter the same password again to verify
you have typed it correctly.
我不知道為什麼會出現這個問題。我記得上次升級ubuntu的時候想要設定下次重開機的密碼,但重開機後卻沒有得到密碼。知道我無法清除 /var/log/journal 並且當我運行時什麼也$ sudo rm -rf /var/log/journal/*
沒有發生。
答案1
/etc/systemd/journald.conf
有一個限制大小的設置/var/log/journal/*
SystemMaxUse={n}M
其中{n}
是最大尺寸。
$ sudo rm -rf /var/log/journal/*
什麼都沒發生。
那是對的。rm
僅在出錯時報告。
您確實需要重新啟動您的守護程序才能使其生效(或重新啟動)sudo systemctl restart systemd-journald.service