s0aazq
Last Updated: February 25, 2016
·
1.048K
· vinitcool76
0474e465f54e54cc1225d67dfd5d9be5

Better Readable Disk Usage Stats.

Add this alias to the your .bashrc and you will have a more Human readable du stats.

I have aliased it to duf, you can alias it to anything you like.Here is the code:

alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\'

Here is the link, and here is how it looks like

Picture

Say Thanks
Respond
Filed Under