Skip to content


文件数 目录名
17 ./test/dir1
12 ./test/dir2
16 ./test/dir3/dir4/dir5
15 ./test/dir3/dir4/d …

find . -type f | sed ‘s/\(.*\)\/.*/\1\//’|sort | uniq -c

find . -type f | awk ‘BEGIN{FS=OFS=”/”}{$NF=””;a[$0]++}END{for(i in a) print a[i]”\t”i}’

Posted in shell.

Tagged with .

No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.