Check the number of files in a subdirectory in linux

Query the number of files in each subdirectory

find . -maxdepth 1 -type d | while read dir; do count=$(find "$dir" -type f | wc -l); echo "$dir : $count"; done

Guess you like

Origin blog.csdn.net/bcfd_yundou/article/details/126152737