Subject: Re: bin/560: ls -i returns incorrect inodes on symlinks and root dirs
To: None <email@example.com>
From: John Kohl <firstname.lastname@example.org>
Date: 11/07/1994 21:34:07
>>>>> "GW" == I can teach you how to fish <email@example.com> writes:
GW> Tried that. Bought the OS. :-)
GW> Seriously, though, "ls -Li" produces no different results.
GW> Take for example /usr. In /, the entry "usr" should have a different
GW> inum than usr/. and usr/..; this is shown when on most other systems
GW> one does "ls -i /" versus "ls -id /usr".
My take on this: When you mount a file system, the root of the newly
mounted filesystem replaces the mounted-over directory. Perhaps it was
still slightly visible in previous BSD releases, but now it's only
visible through the major/minor device numbers as returned by stat(2),
and not by the inode number that ls(1) managed to squeak out of some
system call previously.
I am surprised to hear that ls(1) on older BSD systems give you the
inumber of the mounted-over directory!