Good question, it may depend on the distro afaik
Good question, it may depend on the distro afaik
Cron is better known than a systemd timer, but you can provide an example for the timer 😃
If logrotate doesn’t work, than use this as a cronjob via sudo crontab -e
Put this line at the end of the file:
0 0 * * * journalctl --vacuum-size=1G >/dev/null 2>&1
Everyday the logs will be trimmed to 1GB. Usually the logs are trimmed automatically at 4GB, but sometimes this does not work
Glad to help your family, share this wisdom with friends too ☝🏻😃
Check current disk usage:
sudo journalctl --disk-usage
Use rotate function:
sudo journalctl --rotate
Or
Remove all logs and keep the last 2 days:
sudo journalctl --vacuum-time=2days
Or
Remove all logs and only keep the last 100MB:
sudo journalctl --vacuum-size=100M
Follow specific log for a service:
sudo journalctl -fu SERVICE
Show extended log info and print the last lines of a service:
sudo journalctl -xeu SERVICE
Did not see it 😅
But I don’t like XFCE
Both ☝🏻
Thanks for this addition ☺️