LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-16-2010, 05:18 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
Is there a command to count inodes with in a directory?


Is there a command to count inodes with in a directory?

I know I can see total inode usage with:
df -i

And I know I can find total number of files with:
find ./ |wc -l

But how can I find inodes? As files over 8kb (if using the default partitioning of 1 node over 2 4kb blocks) would take up more than 1 inode.
 
Old 07-16-2010, 09:53 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by abefroman
But how can I find inodes? As files over 8kb (if using the default partitioning of 1 node over 2 4kb blocks) would take up more than 1 inode.
That doesn't sound right to me. Inode -> file should be a one to one (or one to many, in the case of hard links) relationship.
 
Old 07-16-2010, 10:16 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by anomie View Post
That doesn't sound right to me. Inode -> file should be a one to one (or one to many, in the case of hard links) relationship.
I just tested this, you are correct.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
directory list count saranraj Linux - Newbie 18 02-26-2010 03:05 AM
Any command available to find out the number of inodes available in the system? Marty21 Linux - Newbie 3 01-09-2009 07:31 PM
How to get list of all inodes in a directory PankajDS Linux - Kernel 1 03-02-2008 07:28 PM
Count the number of files in a directory and sub-directories within that directory soumyajit.haldar Linux - Software 4 03-20-2007 06:22 AM
how to get count of files in a directory? hongxing Linux - Software 2 11-10-2005 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration