반응형
1. n일 이전에 수정된 파일 찾기
# find /path/to/search -type f -mtime +n
2. n일 이내에 수정된 파일 찾기
# find /path/to/search -type f -mtime -n
3. 정확히 n일 전에 수정된 파일 찾기
# find /path/to/search -type f -mtime n
4. 시간 단위(-mmin)로 검색
# find /path/to/search -type f -mmin -60
5. 특정 날짜 범위에서 검색 (-newer 옵션)
만약 특정 날짜 이후에 수정된 파일을 찾고 싶다면 touch 명령어와 -newer 옵션을 사용할 수 있음.
# touch -t 202403250000 /tmp/timestamp
# find /path/to/search -type f -newer /tmp/timestamp
from ChatGPT
반응형