Calculate the total disk space used by a list of files or directories

du -c

February 14, 2012openiduser30

Explanation

-c option of du prints the total size of the arguments

Related one-liners

Calculate the total disk space used by a list of files or directories

du -s file1 dir1 | awk '{sum += $1} END {print sum}'

December 28, 2011bashoneliners