
例如,我想為下面的所有文件設定規則/home/example_user/public/
,並且所有日誌實際上位於不同的子目錄中,例如:/home/example_user/public/siteA/access.log
、/home/example_user/public/siteB/seperate/error.log
等,我該怎麼辦?這能解決問題嗎:
/home/example_user/public/*/*.log {
weekly
missingok
rotate 10
blahblahblah...
}
謝謝
答案1
是的,您提供的 logrotate 設定將起作用。