Hello Sunil Kumar :-)
Originally Posted by sunil470763
hi dear ,
i am new user of linux i am unable to understand the file system .my problem is that if i am creating a unix file system with 2Kb per inode then can we save 10mb file on the system. if yes then what happen with inode and inode table.
Thanks in Advance
Except in special circumstances, a file's inode does not contain the data. See http://wiki.answers.com/Q/What_is_an...umber_in_Linux
for a simple explanation of what an inode contains. What it doesn't say is that the inode also contains pointers to the file's data blocks. See http://wiki.linuxquestions.org/wiki/Inode
for a more complicated explanation and http://en.wikipedia.org/wiki/Inode
for a more complete explanation.
If the file needs more data blocks than can be pointed to by a single inode then the last pointer goes to another inode containing pointers to further data blocks and so on. Nice diagram at http://en.wikipedia.org/wiki/Inode_pointer_structure
You can see a lot of what is in an inode using the stat command:
c@CW8:~$ stat ~/.bashrc
Size: 2931 Blocks: 8 IO Block: 4096 regular file
Device: fe02h/65026d Inode: 583364 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ c) Gid: ( 1000/ c)
Access: 2009-07-22 01:11:20.000000000 +0530
Modify: 2008-08-03 21:24:33.000000000 +0530
Change: 2008-08-03 21:24:33.000000000 +0530
It is possible to have more than one inode pointing to the same file data. This is called "hard linking".
So what is the file? It's inode(s) or its data? Both!