
저는 FreeBSD 8.1을 실행하고 있습니다. newsyslog가 동적 경로로 정의된 로그를 회전시키려고 합니다.
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/path/logs/*.log 644 7 100 $D0 J
/path/logs/*/*.log 644 7 100 $D0 J
기본적으로 newsyslog가 /path/logs/ 디렉토리에서 .log로 끝나는 모든 파일을 회전시키길 원합니다.
또한 내 구성 파일의 두 번째 줄인 /path/logs/의 모든 하위 디렉터리에 대해 동일한 작업을 수행하고 싶습니다.
하지만 내가 할 때 :
newsyslog -F
로그 파일은 순환되지 않습니다.
답변1
G
플래그를 사용하면 /etc/newsyslog.conf
도움이 됩니다.
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/path/logs/*.log 644 7 100 $D0 G
/path/logs/*/*.log 644 7 100 $D0 G