You already are printing the results for all *.jpg files. The only problem is that by using --printf="%s"
you are changing the output format of stat
to print only the size (without line breaks or spaces in between each item).
Try instead:
stat --printf="%s
" *.jpg >> results.txt
# OR
stat -c "%s" *.jpg >> results.txt
To print the filename next to the size, try:
stat --printf="%n %s
" *.jpg >> results.txt
# OR
stat -c "%n %s" *.jpg >> results.txt
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…