[KLUG Members] Fw: [blug-tech] Sort disk listings by size
Miles Pschigoda
miles.j.pschigoda at wmich.edu
Thu Sep 9 23:59:42 EDT 2004
Quoting komal <agencies_ad1 at sancharnet.in>:
>
> > This may be a strange one to ask, but here goes:
> >
> > I need to create a lsit of every file on my hard disk. ls -alR
> will do
> > that.
> >
> > However, now I need to sort that list in descending order by
> size, and I
> > need to know in which directories they are.
> >
> > i.e., I am trying to locate the largest files on my disk, for
> obvious
> > reasons.
> >
> > Anyone have an idea how to do that?
> >
> > Atul
[google search: http://www.google.com/linux?q=%22find+large+files%22 ]
I found this to be useful:
http://www.netsys.com/suse-linux-e/1999-Dec/2641.html
short version:
# du -x / | sort -nr | head -200
Will find the 200 largest files on your drive, for a list of *all*
files just drop the "| head -200" part.
-- MilesP
More information about the Members
mailing list