[olug] Unix Tip: FULL OF FILESYSTEM INODES

Unix Guru Universe listserv at ugu.com
Sat Nov 16 19:01:57 UTC 2002


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 2146 - November 16, 2002

		    http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


FULL OF FILESYSTEM INODES

We recently had a problem where a file system had 100% inode usage.
Unfortunately there isn't an easy way to search for directories with 
a lot of files in them (1 file = 1 inode). And if the files are small, 
you can't rely on du to help you out.

Here is a find command that will print all the directories in the 
current filesystem, with the number of files (inodes) in that directory.

find . -xdev -type d -exec /bin/echo -n {} \; -exec sh -c "ls {} | wc -l" \;

This tip generously supported by: rickb at cmhcsys.com



--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX 
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT 
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================




More information about the OLUG mailing list