The following command will show the disk consumed by each folder.
# du */ -hs 28G Amar/ 22G Aurang/ 20G Mu/ 19G Nag/ 13G Nash/ 19G Pun/ How do I know the number of files ending with .sql in each folder?
There are no sub-folder if that matters.
There are certainly lots of ways to do this. Here is one with a simple approach:
for i in *; do [[ -d $i ]] || continue; echo $i/: $(find "$i" -maxdepth 1 -type f -name '*.sql' | wc -l); done As you requested, this approach does not take into account the subdirectories.