Skip to content

Instantly share code, notes, and snippets.

@niloct
Last active January 18, 2017 14:41
Show Gist options
  • Save niloct/c9835f9b305faa71070fd4d3620c0855 to your computer and use it in GitHub Desktop.
Save niloct/c9835f9b305faa71070fd4d3620c0855 to your computer and use it in GitHub Desktop.
Bash command for sorting `docker images` command by image size ascending.
alias docker-images-by-size="LC=$LC_NUMERIC && LC_NUMERIC=en_US.UTF-8 && docker images | head -1 && docker images | awk 'NR>2' | sort -k8h -k7n && LC_NUMERIC=$LC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment