LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-17-2009, 06:38 PM   #1
hybernate20
LQ Newbie
 
Registered: Feb 2006
Distribution: Gentoo
Posts: 13

Rep: Reputation: 0
inode count


Hello,

I was wondering if anybody knows of a way to find out what the inode usage is for a particular folder. I know that you can check it with a df -i for an entire FS, but that doesn't really help me. Any ideas?
 
Old 03-17-2009, 06:46 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
A goofy hack off the top of my head:
Code:
%find some_folder -type f -exec ls -i {} \; > my-output
%awk '{print $1}' my-output | sort | uniq | wc -l
The sort/uniq combo is there to squeeze out duplicated instances of hard links. There may be a more elegant solution than this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is inode. shellarchive Red Hat 2 01-02-2008 12:12 AM
Increase max inode count xPhoenix Slackware 2 10-05-2006 03:14 AM
inode ahmed gamal Slackware 2 04-02-2006 09:34 AM
inode muthiahm Linux - Newbie 2 06-11-2004 05:00 PM
Should posts in general count on your post count? Joey.Dale General 16 01-27-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:59 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration