way to find directories with large amount of files

find . -type d -name "*name1*" -o -name "*name2*" | while read DIR; do ls -A $DIR | echo $(wc -w) $DIR; done | egrep [1-9][0-9][0-9][0-9]+\ | sort -nrk1 | head

Leave a Reply

Your email address will not be published. Required fields are marked *