Artificial intelligent assistant

Find the total size of certain files within a directory branch 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?

find ./photos/john_doe -type f -name '*.jpg' -exec du -ch {} + | grep total$


If more than one invocation of `du` is required because the file list is very long, multiple totals will be reported and need to be summed.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 627d8bcf2e2c497c74f5c2fb48fec74f