Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Logrotate can work on individual files or wildcarded files (*.log, for example) in a specified directory, but does it inherently have the ability to traverse a directory tree of arbitrary depth and process files it finds?

thanx

share|improve this question

1 Answer 1

up vote 1 down vote accepted

No, it doesn't. You can wildcard the directories though so if your tree has a small-ish known depth you could do something like:

   /a/* /a/*/* /a/*/*/*  {
       rotate 5
       weekly
   }

If you only have logs at the leaf only /a/*/*/* is needed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.