logrotate 와일드카드가 빈 파일을 생성합니다.

logrotate 와일드카드가 빈 파일을 생성합니다.

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

관련 정보