Answer the question
In order to leave comments, you need to log in
How to delete a logfile after it is compressed in logrotate?
Hello. Subject.
It is necessary that the compressed file remains (this is understandable), and the old log is deleted, (this is not clear)?
Now the file is being cleared instead of being deleted entirely.
Example
/opt/atlassian/jira/logs/catalina.out
/opt/atlassian/jira/logs/access_log.* {
daily
rotate 30
missingok
create 644 jira jira
dateext
compress
sharedscripts
Answer the question
In order to leave comments, you need to log in
So. Thank you all for your help. I realized the wrong approach. You must first cut off the built-in loggers, and then deal with rotate
You are confusing something.
Logrotate compresses and deletes the file.
And a new one is created for you by "create 644 jira jira"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question