[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: df -h listing



On 10/9/07, cga2000 <cga2000@optonline.net> wrote:
> On Mon, Oct 08, 2007 at 09:55:26AM EDT, Miles Bader wrote:
> > Rick Pasotto <rick@niof.net> writes:
> > >> I think you missed someting? like the -n flag? If you do a normal sort,
> > >> its alphabetic. With -n, it is done numeric.
> > >
> > > That's true but it doesn't help anyway. 57K will sort larger than 2M.
> >
> > You could do it in two stages, first without -h, to sort, then with -h,
> > to display... e.g.:
> >
> >    df -h `df | tail -n +2 | sort -n -k2 | awk '{print $NF}'`
>
> Very elegant.
>
> Thanks,
> cga
>
well, i made a simple test on my laptop and the following does the job:
$ du -k ./ | sort -n | tail

anyway, than you very much for all the answers !

-- 
roberto
OS: GNU/Linux, Debian



Reply to: