find_명령어 썸네일형 리스트형 find rm 명령어 find rm 명령어 Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] 생성된 지 30일 이상 된 파일만 삭제 find /var/spool/clientmqueue -ctime +30 -exec rm -f {} \; find /var/spool/clientmqueue -ctime +30 | xargs rm -r https://explainshell.com/ explainshell.com - match command-line arguments to their help text explainshell.com 더보기 [명령어] find 명령어 find 명령어 find 명령의 기본 구문 find [검색 경로] [옵션] [검색 조건] 유용한 find 명령의 옵션 -type: 파일 형식으로 검색합니다. 예를 들어, -type f는 일반 파일만 검색합니다. -size: 파일 크기로 검색합니다. 예를 들어, -size +10M는 10MB보다 큰 파일을 검색합니다. -mtime: 파일 수정 시간으로 검색합니다. 예를 들어, -mtime -7은 7일 이내에 수정된 파일을 검색합니다. -exec: 검색된 파일에 대해 지정된 명령을 실행합니다. 예를 들어, -exec ls -l {} \;는 검색된 파일의 자세한 정보를 출력합니다. 생성된 지 30일 이상 된 파일만 삭제 crontab -e 0 2 * * * find /var/spool/clientmqueue .. 더보기 이전 1 다음