[CentOS] logrotate and regular expressions

nate centos at linuxpowered.net
Wed Sep 23 16:40:11 UTC 2009


Sol Fulop wrote:
> Is there a way around that??? Like run a command to get all the
> filenames then pipe it to the config directive
> /path/to/logs/access_log.www.*.(com|org|net|us) {} in logrotate.conf?

Generate your logrotate config dynamically if nothing else,
that's what scripting is for, run a cron that runs a few minutes
before logrotate to update the config to include any of the latest
files and logrotate will pick it up. Or create a separate logrotate
config for each site and drop it in a directory and have logrotate
include all configs in that directory.

nate





More information about the CentOS mailing list