If I have a logrotate config file like this,
# matches multiple ones
/var/log/project/*.log {
...
prerotate
...
endscript
...
}
So how does the glob work here? If I have 3 log file matches that pattern, would the prerotate script get executed for 3 times or only once? I didn't find any clue in logrotate (8)
Best Answer
It's executed three times, once for each matching file. There's a hint in the man page:
But of course, you only find that once you know to look there. (Also, I experimentally verified with
logrotate -v
;) )