Number of files

This one line command will list each folders in current path by the number of files inside of it, recursively.

find . -type d -exec sh -c "fc=\$(find '{}' -type f | wc -l); echo \"\$fc\t{}\"" \; | sort -nr

For only one/specified level of recursion :

find . -maxdepth 1 -type d -exec sh -c "fc=\$(find '{}' -type f | wc -l); echo \"\$fc\t{}\"" \; | sort -nr

Laissez un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors