The small linux problem thread

zdb -Pbbb \
| grep -B 999999 'Histogram' \ 
| grep -A 9999999 'ASIZE' \
| grep -v -e 'L0 ZFS plain file' -e 'arbitrary row' \
| awk '{s+=$4} END {print s}'```

1st grep: Print thousands of lines Before “Histogram”
2nd grep: Print thousands of lines After “ASIZE”
3rd grep: Exclude “L0” and exclude “arbitrary”
4th awk: Sum all numbers in column 4.

4 Likes