4 5
6
7 |
# 매일 새벽 1시 정각
#/free/home/user/tomcat/logs/ 경로 하위의 모든 파일 중 3일 이전에 수정된 파일들을 찾아서 삭제
0 1 * * * find /free/home/user/tomcat/logs/* -mtime +3 -exec rm -f {} \;
# 매일 새벽 1시 정각
#/free/home/user/tomcat/logs/catalina.out 파일의 내용을 비움
0 1 * * * cat /dev/null > /free/home/user/tomcat/logs/catalina.out |
'프로그래밍' 카테고리의 다른 글
[Postgres]쿼리 결과 파일로 저장 (0) | 2016.11.10 |
---|---|
[리눅스]cat, more, less, head, tail - 파일내용 확인 (0) | 2016.11.10 |
[tomcat]로그파일 관리 (0) | 2016.11.10 |
[apache] 아파치 컴파일된 셋팅값 조회 (0) | 2016.10.11 |
[apache] 동시접속자 수 늘리기 (0) | 2016.10.11 |