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!
![An Interview with Eric Meyer]()
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
![39 Shirts – Leaving Mozilla]()
In 2001 I had just graduated from a small town high school and headed off to a small town college. I found myself in the quaint computer lab where the substandard computers featured two browsers: Internet Explorer and Mozilla. It was this lab where I fell...
![Add Controls to the PHP Calendar]()
I showed you how to create a PHP calendar last week. The post was very popular so I wanted to follow it up with another post about how you can add controls to the calendar. After all, you don't want your...
![Growl-Style Notifications Using MooTools Roar]()
When I think of premier MooTools plugin developers, Harald "digitarald" Kirschner is usually one of the first people that come to mind. Harald has built some of MooTools' most popular plugins, including AutoCompleter, FancyUpload, and History Manager. My favorite plugin created...
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