how to find folder with multiple files in linux

Today I have to find the folder containing a lot of files but was wondering how to do it

The best way I could found is:

 

find . -type d | cut -d/ -f 2 | uniq -c

 

And if you need to sort it you can use this command:

 

find . -type d | cut -d/ -f 2 | uniq -c | sort -g -r

Leave a Reply

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