[CLUE-Tech] Finding all hard links to a file

Jim Ockers ockers at ockers.net
Sat May 15 23:35:25 MDT 2004


> Now another question: In "The Unix Programming Environment", K&P use od 
> to display the contents of a directory file (showing the mapping between 
> inodes and names).  On Linux, cat, od, dd, and vim seem to know when I 
> give them a directory and refuse to show what's in it (at least the 
> inode number).  Why?  Is there a way anymore to see the contents of a 
> directory file?

Hey, this reminded me of something.  What is it about directories that
makes it impossible to make more than one hardlink to a directory inode?
A few years ago I tried to figure out why you couldn't do this, but I
failed and haven't revisited the question.  I think I read that on one
flavor of unix you could do that, but Linux had it disabled in the
kernel.

So, what would need to happen for there to be two directory inodes both
pointing to the same list of files?

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list