For When You Can't Have The Real Thing
[ start | index | login ]
start > scripts > du-sk2h

du-sk2h

Created by dave. Last edited by dave, 14 years and 150 days ago. Viewed 2,492 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
du-kb2h (921)

du -sk 2 -h

A script which converts the output of du -sk into du -h.

What's the point? Well, this is:

# du -sk * | sort -nr | du-kb2h
         385.6 MB        snipsnap
          46.2 MB        dave
         108.0 KB        dev

By inserting the sort -nr inbetween the du and the output formattng, you can have both a numerically sorted and human-readable output.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt