Tag: recursive file count

unix/linux 디렉토리별 파일 개수 세기.

unix/linux 디렉토리별 파일 개수 세기. 지인 부탁으로 만든 파일 개수 세는 쉘 스크립트. /test/uploads 디렉토리 아래 존재하는 모든 디렉토리내의 파일 갯수를 센다. 맨 아래 디렉토리는 파일 갯수를 그 위의 디렉토리에는 파일과 디렉토리가 더해진 값을 표시한다. #!/bin/sh find /test/uploads -type d | while read -r dir do printf “%s:\t” “$dir”; find “$dir” -type f | wc …

Continue reading