On Fri, 15 Apr 2005, Voytek wrote:

using Tony's method, my largest file is:

find / -ls -type f 2>/dev/null | awk '{print $7 " " $11 }' | sort -nr |
head -10

# cd /proc

Hi,

A handy way to avoid find going into other filesystems (useful when network mounts are around), is to use the -mount option. This tells it to not leave the filesystem that it starts on.

Of course if you have e.g. /usr, /boot, /var etc on different filesystems, then you'd need to explicitly include them. But you're probably wondering why one particular fs is so full anyway.

du has a similar option: -x

You can also skip the awk bit and just sort on the size field (7th field, 6 to the right of the first field).

So putting together the various points (e.g. -ls after -type):
find / -mount -type f -ls | sort -nr +6 | head -n 10

Cheers,

 - Simon


# ls -l kc*
-r--------    1 root     root     948887552 Apr 15 18:41 kcore

what is it and do I need it ..?


-- Voytek -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to