ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Hack:   Playing Hunt the Disk Hog
Subject:   another (better?) way to do this
Date:   2004-09-16 12:16:56
From:   kj6loh
Response to: another (better?) way to do this

Actually, I don't understand the need for the second xargs? This is from my alias list
alias dh='ls -a | grep -v -e '\''^\.\.$'\'' |xargs -i du -s {} |sort -nr |sed -n '\''2,$p'\''|head'
Not quite the same but very similar. If you really want the h put it in after the du. Oh you'll probably have to escape the last dollar sign.