Search This Blog

Get the total size of files in a directory

find . -type f -print0 | xargs -0 stat --format=%s | gawk '{s+=$1} END {print s}'
or
find . -type f -print0 | xargs -0 stat --format=%s | awk '{s+=$1} END {print s}'

No comments:

Post a Comment