Skip to content

Instantly share code, notes, and snippets.

@mamapi
Created February 11, 2023 22:11
Show Gist options
  • Select an option

  • Save mamapi/4192fe7b913daaf6e26be69c9c5f9995 to your computer and use it in GitHub Desktop.

Select an option

Save mamapi/4192fe7b913daaf6e26be69c9c5f9995 to your computer and use it in GitHub Desktop.
Size all files in build_dir
if [[ $OSTYPE == "darwin"* ]]; then
full_size=$(find $build_dir ! -type d -print0 | xargs -0 stat -f '%z' | awk '{sum += $1} END{print sum}')
else
full_size=$(du -sb $build_dir | awk '{print $1}')
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment