[CentOS] logrotate and regular expressions

Luciano Rocha strange at nsk.no-ip.org
Wed Sep 23 16:00:21 UTC 2009


On Wed, Sep 23, 2009 at 11:51:04AM -0400, 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?

In that particular instance, you can use:
/path/to/logs/access_log.www.*.com /path/to/logs/access_log.www.*.org \
  /path/to/logs/access_log.www.*.net /path/to/logs/access_log.www.*.us {
  compress
  daily
 ...
}

I don't know if *.{com,org,net,us} works, never tried it. You could also
regenerate the configuration daily from a template file.

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20090923/83949925/attachment.sig>


More information about the CentOS mailing list