D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] inodes

 

On Tue, 2008-08-05 at 16:30 +0100, Mark Evans wrote:
> Anton Channing wrote:
> > My webhost is complaining that I have
> > exceeded my inode limit.  I never even
> > realised there was such a limit, and
> > certainly didn't know what an inode was.
> 
> It's short for "information node".
> > 
> > I've looked it up and I now know, but
> > my problem is locating my inodes.
> > 
> > In order to reduce my inodes, I must first
> > find the main culprits.
> > 
> > I can't seem to find a command that
> > will tell me how many inodes are
> > located in each directory (including
> > those recursively in that directories
> > sub-directories).
> 
> A rough figure would be the number of entries,
> excluding "." & "..". Every file, of whatever type,
> needs one inode.
> 
> The "-i" option of ls will display the inode number together
> with the file name.
> "ls -aliR <dir> |grep ^[0-9]|awk ' {print $1}'|sort |uniq|wc"
> will give you an exact count. (Though you might need to modify it to
> also look at the file owner...)
> 
Jumping in the middle here... it is probably worth mentioning that
'df -i' will tell you how many inodes have been used/are free.


John

-- 
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 587287
E-mail: John.Horne@xxxxxxxxxxxxxx       Fax: +44 (0)1752 587001

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html