LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2004, 01:15 AM   #1
eshwar_ind
Member
 
Registered: Feb 2004
Location: Bangalore
Distribution: Redhat
Posts: 144

Rep: Reputation: 15
about inode


Hi!

Can anybody where can i found the structure of inode in header files? I couldnt find it. if you know please let me know. One more question symbolic link's disk usage is giving as zero. Where the target name name is stored for the symbolic link ? Is it inode or on data blocks? Is the inode structure of linux is same as unix?
Please let me know.
I will be very thank full to you.

bye,
Eshwar.
 
Old 04-24-2004, 07:07 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Code:
find /usr/include/linux -name "*.h" | xargs grep -l 'struct *.*inode *{'
 
Old 04-24-2004, 07:50 AM   #3
eshwar_ind
Member
 
Registered: Feb 2004
Location: Bangalore
Distribution: Redhat
Posts: 144

Original Poster
Rep: Reputation: 15
Thanks Mr. Hko
Thankyou very much.
I have another doubt. When we create a symbolic link, If the targets path name is more than 40 bytes its storing in data blocks( i.e disk usage is giving some number other than zero), but if its less than 40 bytes its giving 0 bytes ( i.e Its storing the target name inode it self ). How does it differentiates between these two situations. Please let me know.
Once again thanks Hko.
Bye,
Eshwar.
 
Old 04-24-2004, 02:39 PM   #4
rkef
Member
 
Registered: Mar 2004
Location: bursa
Posts: 110

Rep: Reputation: 15
Quote:
Originally posted by Hko
Code:
find /usr/include/linux -name "*.h" | xargs grep -l 'struct *.*inode *{'
Or, more simply:
Code:
grep -lR 'struct.*inode *{' /usr/include/linux/*.h
Your method works perfectly well, but seems gratuitous (22 bytes extra, 2 programs extra) .

Last edited by rkef; 04-24-2004 at 02:41 PM.
 
  


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
Unattached Inode? Killean Slackware 8 05-17-2006 04:38 PM
How many bytes per inode? theonebeyond Linux - Newbie 2 09-24-2004 02:36 AM
Should I truncate an inode? akurtis Red Hat 0 08-02-2004 09:34 PM
Inode issue HeReigns Linux - General 1 07-09-2004 11:46 AM
inode muthiahm Linux - Newbie 2 06-11-2004 04:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:40 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