알짜게시판

로그 삭제 및 비우기(?)

용량이 꽉 찬 서버를 보고 깜짝 놀라서 남김 (갑자기 아무 기억이 안났음 ㅠㅠ)

평소에 문제 없을때 한번씩!

# 실시간 사용중인 로그들 비우고
cat /dev/null > /var/log/httpd/access_log
cat /dev/null > /var/log/httpd/error_log
cat /dev/null > /var/log/httpd/ssl_access_log
cat /dev/null > /var/log/httpd/ssl_error_log
cat /dev/null > /var/log/httpd/ssl_request_log

# 백업된 로그들 삭제
rm -f /var/log/httpd/access_log-*
rm -f /var/log/httpd/error_log-*
rm -f /var/log/httpd/ssl_access_log-*
rm -f /var/log/httpd/ssl_error_log-*
rm -f /var/log/httpd/ssl_request_log-*

로그인 후 댓글내용을 입력해주세요

제목 글쓴이 조회 날짜
리눅스 아파치 일반 계정 파일 접근 권한 설정과 mod-ruid2 적용 방법 124 26-04-26
리눅스 Dante SOCKS5 프록시 서버 구축 및 설정 304 26-04-10
리눅스 Apache 웹 로그 분석하기 – awk와 GoAccess 활용 18,721 25-10-28
리눅스 PHP 파일 업로드 용량 늘리기 56,792 25-10-03
리눅스 구글 크롬 콘솔 'Attestation check for Topics on' 에러 원인… 61,082 25-04-11
리눅스 PHP-FPM 튜닝을 위한 메모리 계산 42,325 24-08-29
리눅스 데몬(systemd service) 작성 및 실행하기 66,985 24-03-14
리눅스 메일(Mail) 삭제/초기화 59,138 23-07-18
리눅스 PHP 버전 추가하기 35,511 23-04-29
리눅스 yum 에서 Thread died in Berkeley DB library 오류 60,143 22-09-18
리눅스 VNSTAT 설치하기 57,007 22-09-17
리눅스 로그 삭제 및 비우기(?) 59,192 22-09-09
리눅스 .htaccess 를 이용해서 https 이동하기 46,157 22-08-31
리눅스 윈도우 프로그램 실행 (centos7, wine 7.0) 45,976 22-08-09
리눅스 웹서버 상태 확인 후 자동 재시작 쉘 스크립트 42,023 22-02-28
리눅스 Composer 설치하기 2,633 20-07-06
리눅스 Swap 생성/수정 2,932 19-09-04
리눅스 바이러스 검사 2,744 19-09-04
리눅스 간단한 보안 체크하기 2,671 19-06-05
목록
보안IT주방연구소잡학지식의료건강망치와삽