du -k | sort -n | perl -ne 'if ( /^(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024));
printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10*$m))),
The above (in one line command) will find, view, sort and print in the screen stars in ascending order the biggest files and/or directories from the current directory.(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}'
Certainly is a very useful command. It's a work of programming art.
Thanks to
0 comments:
Post a Comment