0

I'd like to specify the files for logrotate to handle via the following wildcard string: /home/deploy/*/logs/nginx-*.log

If I do ls with this wildcard string, it shows exactly the files I want to be rotated. Will logrotate handle the wildcard string as expected, i.e. the same as with ls?

Ghopper21
  • 103

1 Answers1

4

Yes it does see man logrotate, but note the warning:

Please use wildcards with caution. If you specify *, logrotate will rotate all files, including previously rotated ones. A way around this is to use the olddir directive or a more exact wildcard (such as *.log).

George Udosen
  • 36,677