D&C GLug - Home Page

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

Re: [LUG] inodes

 

John Horne wrote:
> 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
>
>   
A very useful tool, if you're looking at the number of inodes for a 
given mounted disk/block device.  But if you're trying to establish the 
number of inodes within a particular part of that disk/block device 
(say, just the /home directory), then alternatives are required.

Thanks though. :)

Grant.


-- 
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