On Mon, Oct 08, 2007 at 01:46:10PM +0200, Wolodja Wentland wrote:
> On Mon, 2007-10-08 at 13:24 +0200, roberto wrote:
> > hello
> > i use the "df -h" or "du -h"command to check how much disk space is
> > occupied by files and directories
> > 
> > but is it possible to sort the output list in an order such that the
> > first (or conversely the last) item is the largest in size ?
> 
> You can achieve this by sorting the output produced by df/du like this:
> 
>       "df -h|sort -k2"
> 
> The "-k2" tells sort to sort by the second column. If you want it sorted
> in reverse order add the "-r" option.
> 
> Hope that answers your question
I think you missed someting? like the -n flag? If you do a normal sort,
its alphabetic. With -n, it is done numeric.
-K
-- 
|  .''`.  == Debian GNU/Linux == |       my web site:           |
| : :' :      The  Universal     |mysite.verizon.net/kevin.mark/|
| `. `'      Operating System    | go to counter.li.org and     |
|   `-    http://www.debian.org/ |    be counted! #238656       |
|  my keyserver: subkeys.pgp.net |     my NPO: cfsg.org         |
|join the new debian-community.org to help Debian!              |
|_______  Unless I ask to be CCd, assume I am subscribed _______|


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to