본문 바로가기
Backup Solution & IT Study/OS

[Linux]find 명령어

by DellEMC Backup Engineer 2021. 3. 2.

- / 경로에서 하위 까지 test.log 찾기

find / -name test.log

 

- / 경로에서 test.log 검색하여 "abc" 문자열 찾기

find / -name test.log -exec grep "abc" {}

 

- /var/log 경로에서 "*.log" 로 끝나는 파일 삭제

find /var/log -name "*.log" -delete

댓글