Created
July 27, 2023 03:30
-
-
Save jdolitsky/8fe4c6b8bd953b43092d6d205a1b1f06 to your computer and use it in GitHub Desktop.
Top 10 largest files in a container image
This file contains 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 characters
top_10_files() { crane export $1 --platform linux/amd64 | tar -tvf - | awk -v size="$size" '$5 >= size {print $5" "$9}' | sort -nrk1.2 | head -n10 | numfmt --to=iec-i --suffix=B --format="%9.2f"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment