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
view raw number-of-files.md hosted with ❤ by GitHub

Laissez un commentaire

Votre adresse de messagerie ne sera pas publiée.

Search
Generic filters
Exact matches only
Filter by Custom Post Type