I also considered this problem (only after a year ...) - I just found this page.
Something I found works (for me):
find /mnt/iso -name *.avi -printf "%s\n" | paste -sd+ - | bc
This will return the total size of all .avi files in all subfolders below / mnt / iso
I have to pay tribute to radoulov for the paste command - see this page: Shell command for summing integers, one per line?
Just add - just in case the folder matches the search query - it's nice to also use -type f in the find command.
T-Monster Jun 09 2018-11-11T00: 00Z
source share