更新时间:2022-11-02 21:56:09
假设你已经找到GNU,让它找到的目录,让庆典做休息:
Assuming you have GNU find, let it find the directories and let bash do the rest:
find . -type d -print0 | while read -d '' -r dir; do
files=("$dir"/*)
printf "%5d files in directory %s\n" "${#files[@]}" "$dir"
done