journalctl清理日志

查看日志占用

$ journalctl --disk-usage
Archived and active journals take up 4.0G in the file system.

按日期删除日志

$ sudo journalctl --vacuum-time=1w
Deleted archived journal /var/log/journal/86896ab5743643b28117425f336eead2/system@00000000000000000000000000000000-000000000000051c-00060df2925bca63.journal (72.0M).
...
Vacuuming done, freed 0B of archived journals from /run/log/journal.
Vacuuming done, freed 0B of archived journals from /var/log/journal.

发表回复

电子邮件地址不会被公开。必填项已用 * 标注