Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to configure logrotate to just delete all files under selected directory once a week?

I'm testing the following:

/var/spool/mydir/* {

    rotate 0
    copytruncate }

But it doesn't seem to remove anything. Should I wait one day?

Thank you.

share|improve this question
You wanted to prune a directory one a week, but you specified daily. Did you mean to specify weekly in the config file? – JeffG Mar 2 '11 at 20:23

Your Answer


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

Browse other questions tagged or ask your own question.