sizeup: tidy filesize information in Terminal

That outputs all of the file and folder sizes in the current directory, sorted by size, and lists them in human-readable format. Of course, I wanted to make it a more painful endeavor.

Here’s the result. It’s a shell function that will output the file sizes for files (not folders) and provide a total. It accepts file extensions as arguments, and there are flags for controlling sort order and directory traversal depth. Given the lack of real utility, I won’t go into too much depth, other than to say that the __sizeup_build_query and __sizeup_humanize functions are reusable and pretty handy.

To run in the current folder, just use sizeup. Additional options are: