find 명령어를 실무에서 활용하는 방법을 정리해주세요.
find 실전 사용법:
# 최근 수정된 파일find /var/www -mtime -1 -type f # 1일 이내find . -mmin -30 # 30분 이내# 크기 기준find / -size +100M -type f 2>/dev/null # 100MB 이상find . -empty # 빈 파일/디렉토리# 권한 기준find / -perm -4000 -type f # SUID 파일 (보안 감사)find . -perm 777 # 777 권한# 실행find . -name "*.log" -exec rm {} ; # 삭제find . -name "*.js" -exec grep -l "TODO" {} ; # 내용 검색# 제외find . -name "*.ts" -not -path "*/node_modules/*"# 여러 조건find . \( -name "*.jpg" -o -name "*.png" \) -size +1M
댓글 2
find 실전 사용법: