Subject: Re: determining an iso from vnd
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 02/01/2007 22:33:22
George Georgalis wrote:
> shouldn't we be able to use stat to look up
> the file attributes, like name and path, from the inode?

An inode, like a network node, is a number.  Just as /etc/hosts and DNS
map names to network addresses, just as /etc/services maps names to ports,
so too does a filesystem directory map names to inodes.  The number
doesn't know its name, and, as you know, can have many names.  

That's not to say it can't be done, of course; that's just to say it's a
singly-linked list.  To look up names by number, you'd need a
number-to-name linked list.  I don't know of any OS that maintains such a
list. 

Apple has something similar: if you create an "alias" in the OS X Finder
and then rename the target with mv(1), the alias continues to work.  (The
alias is not a symlink.  file(1) says only that it's empty.)  Cf.
http://www.kernelthread.com/mac/osx/arch_fs.html and look for "Aliases". 

HTH.  

--jkl