I used to have this sweet alias for du I called dusort that would print out a human-readable list of sizes for the top-level subdirectories+files sorted by size. It was like a mini-filelight for mac that runs in terminal.
But now my alias is broken after I copied it to my new mac running Mac OS 10.6. Apparently the sort I used either came from fink (which I am trying to avoid re-installing on my new mac) or the one shipping with 10.6 has less features than the one shipping with 10.4 (far less likely.)
Here is the old alias that's a bit kludgy because it has to run du twice to get both the machine-readable and human-readable file sizes (I actually have this saved as a script in ~/bin with a #!/bin/bash but that shouldn't matter): sort -n +1 <(paste <(du -hd1|cut -f1) <(du -d1))|cut -f1,3
Any ideas on: A. Making it work again? B. Making this command more elegant using bash wizardry?
I know I could fix this by copying the du output to a temp file or fifo or some such nonsense, but this is getting ridiculous. I decided to come here to get assistance in kicking my kludgy bash habits. Please advise. :)