Tricks for finding directory space usage.
Tricks for finding directory space usage. find . -iname "*regex" -printf "%s\n" | awk '{f+=$1}END{print f/(1024 *1024 * 1024),"GB"}' find . -iname "*.regex" -printf "%s\n" | awk '{f+=$1}END{print f}' another way.
find -name \*.regex -print0 | du -ch --files0-from=- |tail -1 du -ch -b --max-depth=1 |sort -n|awk '{ print $1/(1024 *1024 * 1024),"gb", $2 }' Heres almost the same command excluding anything requiring special notation close to zero.
du -ch -b --max-depth=1 |sort -n|awk '{ print $1/(1024 *1024 * 1024),"gb", $2 }' |grep -v e-0 another way.
Posted by "Benjamin Rizkowsky" on Thursday, July 14, 2016