logrotateでワイルドカードを使用すると、空のファイルが生成されることがわかりました。これらの空のファイルを生成しないソリューションを探したいと思います。助けてくれてありがとう
私の抜粋
/etc/logrotate.d/tomcat
/Data/logs/localhost_* {
copytruncate
daily
rotate 7
compress
missingok
notifempty
size 10M
maxage 15
}
私が走るとき
/usr/sbin/logrotate /etc/logrotate.conf
du -sh ./*
1020K ./catalina.out
13M ./catalina.out-20191114.gz
84K ./localhost.2019-10-30.log
2,9M ./localhost_access_log2019-09-30.txt-14112019-20191115.gz
3,1M ./localhost_access_log2019-11-06.txt-20191115.gz
3,0M ./localhost_access_log2019-11-07.txt-20191115.gz
3,0M ./localhost_access_log2019-11-08.txt-20191115.gz
3,0M ./localhost_access_log2019-11-09.txt-20191115.gz
3,0M ./localhost_access_log2019-11-10.txt-20191115.gz
3,0M ./localhost_access_log2019-11-11.txt-20191115.gz
3,0M ./localhost_access_log2019-11-12.txt-20191115.gz
3,0M ./localhost_access_log2019-11-13.txt-20191115.gz
3,0M ./localhost_access_log2019-11-14.txt-20191115.gz
0 ./localhost_access_log2019-11-15.txt
1,1M ./localhost_access_log2019-11-15.txt-20191115.gz
2,1M ./localhost_access_log2019-11-15.txt-20191119.gz
0 ./localhost_access_log2019-11-16.txt
3,1M ./localhost_access_log2019-11-16.txt-20191119.gz
0 ./localhost_access_log2019-11-17.txt
3,1M ./localhost_access_log2019-11-17.txt-20191119.gz
0 ./localhost_access_log2019-11-18.txt
3,4M ./localhost_access_log2019-11-18.txt-20191119.gz
152K ./localhost_access_log2019-11-19.txt
1,3M ./localhost_access_log2019-11-19.txt-20191119.gz