find . -maxdepth 1 -type d | while read dir; do count=$(find "$dir" -type f | wc -l); echo "$dir : $count"; done
-maxdepth 1 过滤目录的深度
-type d 文件类型为目录
-type f 文件类型为文件
Powered by: 博客园 Copyright © 2024 SliverLee Powered by .NET 9.0 on Kubernetes