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

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.