Summing the files sizes from the output of find


find . -name "*.chi" -exec ls -l {} \; -print | awk '{ x += $5 } END {
print "total bytes: " x }'

07/17/2008