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!
![How I Stopped WordPress Comment Spam]()
I love almost every part of being a tech blogger: learning, preaching, bantering, researching. The one part about blogging that I absolutely loathe: dealing with SPAM comments. For the past two years, my blog has registered 8,000+ SPAM comments per day. PER DAY. Bloating my database...
![fetch API]()
One of the worst kept secrets about AJAX on the web is that the underlying API for it, XMLHttpRequest
, wasn't really made for what we've been using it for. We've done well to create elegant APIs around XHR but we know we can do better. Our effort to...
![Dijit’s TabContainer Layout: Easy Tabbed Content]()
One of Dojo's major advantages over other JavaScript toolkits is its Dijit library. Dijit is a UI framework comprised of JavaScript widget classes, CSS files, and HTML templates. One very useful layout class is the TabContainer. TabContainer allows you to quickly create a tabbed content...
![MooTools 1.2 Image Protector: dwProtector]()
Image protection is a hot topic on the net these days, and why shouldn't it be? If you spent two hours designing an awesome graphic, would you want it ripped of in matter of seconds? Hell no! That's why I've created an image...
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