
특정 디렉터리에 있는 특정 파일 크기를 초과하는 파일 수를 계산하는 방법이 있나요? 예를 들어 100MB?
답변1
아마도
find path/to/directory/ -type f -size +100M -printf 1 | wc -c
또는 상위 디렉토리로만 검색을 제한하려는 경우(하위 디렉토리로 내려가지 않고)
find path/to/directory/ -maxdepth 1 -type f -size +100M -printf 1 | wc -c