Feel free to add your comment from here to a comment there, though the format there is <code>foo</code>.
systemd has within it the functionality to create and store logs of processes My limited understanding is that from boot up, because processes and daemons are running, logs will likely to be produced on the fly as well as those already stored to file.
The use of the rotate flag is a way of marking the current active log files as an archive and creating a fresh logfile. The flush flag evokes the journal daemon to flush any log data stored in
Code:
/run/log/journal/ into /var/log/journal/
So you can do both to get things started with this command :
Code:
sudo journalctl --flush --rotate
Then to reduce the volume of systemd log files you can use time such as :
Code:
sudo journalctl --vacuum-time=10s
the above cleans out everything to logs produced in the last 10 seconds , or:
Code:
sudo journalctl –vacuum-size=50M
In the above we trim log size to 50 mebabytes
Now it maybe that you are doing some web development on your PC. Systemd won’t touch those unless you make use of :
Code:
Apache Module mod_journald
But there is another approach if you like to keep things separate, using the package logrotate , even better if your, an ex Slackware control freak , you will of course want to evoke things manually On Arch you can install the pkg using :
Then you add the files you want to trim in the config file
such as :
Code:
/var/log/httpd/andrinaWeb.com-access_log { minsize 1M rotate 1 }
in the above i write with path the logfile that when logrotate is evoked will clear I will do that , manually when i think its an appropriate time using :
Code:
sudo logrotate -vf /etc/logrotate.conf
v is verbose and f flag is force