Skip to main content
3 of 5
added 1 character in body
RomanPerekhrest
  • 30.9k
  • 5
  • 47
  • 68

find + awk approach:

find /home/myuser/parent1 -type f -name "*.png" \
     | awk -F'/' '{ a[$5]++ }END{ for(i in a) print i,a[i] }'
  • $5 - points to a folder name at the needed level
RomanPerekhrest
  • 30.9k
  • 5
  • 47
  • 68