0

DU-Script

A Script to calculate the Sum of all File-Sizes:

~/Clash-of-Clans$ ls -l | tail -n +2 | (while read -r Line; do FileSize=$(echo $Line | awk '{print $5}'); FileName=$(echo $Line | awk '{print $9}'); SumSize=$((SumSize + FileSize)); printf "%-16s %8s %5s\n" $FileName $FileSize $SumSize; done)

Since it has some Amount of Complexity, in the Following I would like to add an Explanation for getting more Trust for its Correctness.