GNU/Linux ◆ xterm-256color ◆ zsh 285 views

In this recording I’m trying to find files inside my current directory (the Oh My Zsh repository) that are bigger than 24kB. I want to have a sense of which files have a bigger impact on install size.

I could use find but its interface is clunky and I really enjoy how powerful zsh globs are. You definitely need tab-completion to see what all the options mean, but luckily tab-completion is really good.

A few pointers:

  • ^cache/ means all folders not named cache (I don’t care about this folder in particular)
  • ** means items in any directory level (this is called recursive globbing)
  • * means any item, and when I open a parenthesis this is where the zsh globbing options appear when pressing tab, to allow me to filter which items in particular I want.

The stuff inside the parentheses means, in order:

  • . (dot): regular files (no symlinks, no folders, etc.)
  • L: filter by size
  • k+24: where size is more (+) than 24 kB (the k is for kB)