[NTLUG:Discuss] inodes

Robert Pearson e2eiod at gmail.com
Sat Sep 9 22:05:02 CDT 2006


On 9/9/06, Leroy Tennison <leroy_tennison at prodigy.net> wrote:
> Another interview question dealt with what inodes contain.  Google is
> leading to confusion.  I suspect the reason is inadequate qualification
> of statements but I'd rather find out than be mis-informed.  Statements
> I'm finding:
>
> There is no difference between a file and a directory since the latter
> is just a special type of file.
>
> Some references say that inodes describe files
> (www.cse.psu.edu/~anand/spring01/linux/files.ppt  - slide 2 and
> http://www.freeos.com/articles/3851/) while one reference
> (http://www-rohan.sdsu.edu/doc/debian/ch-advanced.html) says that the
> inode contains the file.
>
> A hard link is a pointer to an inode.
>
> A directory is simply a list of filename and inode pairs.
>
> You can not have a hard link to a directory in most UNIXes.
>
> Questions:
>
> If a directory is a file and files are accessed through inodes and users
> access inodes through hard links then how does a  user access a
> directory if it doesn't have a hard link in another directory?  Should
> the statement about most UNIXes not allowing hard links to directories
> really say that they don't allow more than one hard link to a directory
> or is there some other answer?
>
> Is the most accurate description of an inode that it contains both
> information about a file (or directory) such as ownership and
> permissions as well as  pointers to it's data blocks and, as a result,
> is the only mechanism for accessing those data blocks as a file?  (I'm
> excluding the concept of accessing the data blocks as raw storage by
> lower-level functions doing disk maintenance).

HTH. I googled for "inode wikipedia" and got:
<<http://en.wikipedia.org/wiki/Inode>>

Wikipedia has limited search capability due to limited hardware resources
and they recommend using Google. It is a lot faster.



More information about the Discuss mailing list