>_ IzzyLab

Topic breakdown

find -printf FORMAT prints the requested fields for each object found: %s — size in bytes, %p — full path, %f — name, %m — permissions in octal, %u/%g — owner/group. A stream of numbers is easy to aggregate in awk: {s+=$1} END{print s} accumulates the sum over all lines and prints it once at the end. This is a universal technique for totalling a column.

What's checked

  1. correct sum
  2. matches the calculation over all files

What it looks like