Assume there's an image storage directory, say, ./photos/john_doe
, within which there are multiple subdirectories, where many certain files reside (say, *.jpg
). How can I calculate a summary size of those files below the john_doe
branch?
I tried du -hs ./photos/john_doe/*/*.jpg
, but this shows individual files only. Also, this tracks only the first nest level of the john_doe
directory, like john_doe/june/
, but skips john_doe/june/outrageous/
.
So, how could I traverse the entire branch, summing up the size of the certain files?