Created
September 8, 2024 04:27
-
-
Save patricktrainer/40181c4fdca5f50419a93411da733f30 to your computer and use it in GitHub Desktop.
Revisions
-
patricktrainer created this gist
Sep 8, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ find . -type f -print0 | xargs -0 stat -f "%z" | awk '{b+=$1} END { if (b > 1073741824) { printf "%.2f GB\n", b/1073741824 } else if (b > 1048576) { printf "%.2f MB\n", b/1048576 } else if (b > 1024) { printf "%.2f KB\n", b/1024 } else { printf "%d bytes\n", b } }'