I have a directory which contains sub-directories, which in turn contain sub-directories, which contain files. How can I list the number of files in each sub-directory recursively?
from this question I know that
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
will list the number of files on the current directory level. How can I do this recursively?
I have also seen this possibility, however I can't get it to work for my specific problem.