Gentoo Archives: gentoo-amd64

From: Pascal BERTIN <pascal.bertin@×××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Whats using all my disc space?
Date: Thu, 16 Oct 2008 09:00:25
Message-Id: 48F702A4.2000605@corobor.com
In Reply to: Re: [gentoo-amd64] Whats using all my disc space? by Mike Doty
1 Mike Doty a écrit :
2 > Paul Stear wrote:
3 >> Hello all,
4 >> How do I list the contents of a disc in size order?
5 >> I need to find out the largest files on a disc. It's my home dir which is
6 >> 98% full, that's over 180GB used, normally its less than half of this.
7 >> I just can't find anything that is very large.
8 >
9 >> Thanks in advance for any help
10 >> Paul
11 > for F in $(find . -type f); do ls -l ${F}; done | awk '{print $5, $9}' |
12 > sort -nr | head -n 10
13 >
14
15 Well, this might simplify your life then :
16 find . -type f -printf "%s %p\n" |sort -nr |head -n 10
17
18 and if you expect the big files to be bigger than say 50M, use this one :
19 find . -type f -size +50M -printf "%s %p\n" |sort -nr |head -n 10
20
21 but this will only report files, while du --max-depth would also report big folders
22 (containing tons of small files)