Difference between revisions of "Limit the size of .log files & the journal/en"

Updating to match new version of source page
(Updating to match new version of source page)
Tags: Mobile web edit Mobile edit
 
(Updating to match new version of source page)
Tags: Mobile web edit Mobile edit
Line 234: Line 234:
Script files that are called via the logrotate.conf file take precedence over the global settings in logrotate.conf . That means that if you call a script from logrotate.conf that is located in the /etc/logrotate.d directory, then that script is more powerful than any of the global setting in logrotate.conf .
Script files that are called via the logrotate.conf file take precedence over the global settings in logrotate.conf . That means that if you call a script from logrotate.conf that is located in the /etc/logrotate.d directory, then that script is more powerful than any of the global setting in logrotate.conf .


I use a script '''/etc.logrotate.d/rotate.logs''' that is set to work on all *.log files, & it does. The two that don't get rotated are called '''faillog''' & '''lastlog''' , apart from not having the '''.log''' file extension, these two files are not normal log files, they are accessed via terminal commands of the same name.
I use a script '''/etc/logrotate.d/rotate.logs''' that is set to work on all *.log files, & it does. The two that don't get rotated are called '''faillog''' & '''lastlog''' , apart from not having the '''.log''' file extension, these two files are not normal log files, they are accessed via terminal commands of the same name.


<br clear="all"/>
<br clear="all"/>
Line 298: Line 298:
I'll show how I have my system set (at the time of this writing), you can use the information already given on this page & other available on the web to fine tune your set up to suit your needs (if you have the need anyway).
I'll show how I have my system set (at the time of this writing), you can use the information already given on this page & other available on the web to fine tune your set up to suit your needs (if you have the need anyway).


=== Firstly - Be sure this file is here /etc/cron.daily/logrotate ===
=== Firstly - Be sure this file is here /etc/cron.daily/logrotate ===
   
   
  #!/bin/sh
  #!/bin/sh
8,826

edits