這是本文件的舊版!


Ubuntu 操作整理

    • 查看目前已使用空間

      root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --disk-usage
      Archived and active journals take up 4.0G in the file system.

    • 即時清除保留兩天

      root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --rotate
      root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --vacuum-time=2days
      :
      root@demo-77:/var/log/journal/4ad9885bb19142118fd758b3be95057e# journalctl --disk-usage
      Archived and active journals take up 16.0M in the file system.

    • 設定最多使用空間 Exp. 500M

      vi /etc/systemd/journald.conf

      :
      [Journal]
      :
      SystemMaxUse=500M
      :
      systemctl daemon-reload
  • tech/ubuntu.1681021672.txt.gz
  • 上一次變更: 2023/04/09 14:27
  • jonathan