Sum the file size of found files (Linux) 2009-01-11

To sum the size of files searched with find or another method, use the following snippet using AWK to get the total size:

find . -xdev -type f -ctime +1 | xargs ls -l | awk 'BEGIN { SUM = 0 } { SUM += $5 } END { print SUM }'