List Files in Human Readable Format
I maintain an older computer with a small hard drive. I use it mostly for storing MP3s, videos, and other types of basic media. Unfortunately I often get warnings that disk space is low and so I need to delete files I no longer need; i.e. music or movies I have probably grown tired of. I always sort them by size, largest first, so I can find out where the cogs are.
The problem is I try to stick to command line but only know how to do that sorting with human readable format by using Mac's Finder utility. I recent found a command which will output the contents of the current directory and its subdirectories by human readable size:
du -sk -- * | sort -n | perl -pe '@SI=qw(K M G T P); s:^(\d+?)((\d\d\d)*)\s:$1." ".$SI[((length $2)/3)]."\t":e'
That command is kinda gross so you'll probably want to save it as an alias. Nonetheless I now know how to get the desired information from command line!
![Chris Coyier’s Favorite CodePen Demos]()
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
![5 More HTML5 APIs You Didn’t Know Existed]()
The HTML5 revolution has provided us some awesome JavaScript and HTML APIs. Some are APIs we knew we've needed for years, others are cutting edge mobile and desktop helpers. Regardless of API strength or purpose, anything to help us better do our job is a...
![Assign Anchor IDs Using MooTools 1.2]()
One of my favorite uses of the MooTools JavaScript library is the SmoothScroll plugin. I use it on my website, my employer's website, and on many customer websites. The best part about the plugin is that it's so easy to implement.
I recently ran...
![CSS Circles]()
A while back I shared a clever technique for creating triangles with only CSS. Over the past year, I've found CSS triangles incredibly effective, especially when looking to create tooltips or design elements with a likewise pointer pattern. There's another common shape...
I use omnidisksweeper once in a while to get rid of junk
I don’t know if this is cross-platform or not, but on Ubuntu I use this