[GLLUG] inodes

Wald computech at ispwest.com
Mon Nov 17 13:22:28 EST 2003


>Send linux-user mailing list submissions to
>        linux-user at egr.msu.edu
>
>To subscribe or unsubscribe via the World Wide Web, visit
>        http://www.egr.msu.edu/mailman/listinfo/linux-user
>or, via email, send a message with subject or body 'help' to
>        linux-user-request at egr.msu.edu
>
>You can reach the person managing the list at
>        linux-user-owner at egr.msu.edu
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of linux-user digest..."
>
>
>Today's Topics:
>
>   1. inodes and ls -dl (Michael Cox)
>   2. Re: inodes and ls -dl (Matt Graham)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Thu, 20 Nov 2003 08:11:26 -0800 (PST)
>From: Michael Cox <cox-m at sbcglobal.net>
>Subject: [GLLUG] inodes and ls -dl
>To: linux-user at egr.msu.edu
>Message-ID: <20031120161126.21808.qmail at web80401.mail.yahoo.com>
>Content-Type: text/plain; charset=us-ascii
>
>I am running through the IBM tutorials and come to 
>
>ls -dl /usr/local
>
>This is supposed to display all the directories shared
>by the inode. The author lists about eight
>directories. While I realize that some variance is to
>be expected, my SuSE 8.2 installation only the single
>directory. I input the same ls -dl /usr/local as both
>a user and root with the same result.
>
>My result:
>
>drwxr-xr-x  11  root   root   272 2003-11-12 17:14
>/usr/local
>
>Is this a normal result and I am confused by the
>difference. Or... good grief, I don't even know
>another possibility. Oh wait, I am using the Rieser
>File System, maybe I should be using some other distro
>to follow this tutorial.
>
>Thoughts?
>
>------------------------------
>
>Message: 2
>Date: Thu, 20 Nov 2003 11:44:29 -0500
>From: Matt Graham <danceswithcrows at usa.net>
>Subject: Re: [GLLUG] inodes and ls -dl
>To: linux-user at egr.msu.edu
>Message-ID: <200311201144.29445.danceswithcrows at usa.net>
>Content-Type: text/plain;  charset="iso-8859-1"
>
>On Thursday 20 November 2003 11:11, after a long battle with technology, 
>Michael Cox wrote:
>> ls -dl /usr/local
>> This is supposed to display all the directories shared
>> by the inode.
>
>On my systems (Gentoo), ls -d without arguments displays the current 
>directory . and that's it.  It's supposed to do that according to the 
>man page for ls.  What does the tutorial mean when it says "all the 
>directories shared by the inode"?  Each directory that exists has its 
>own inode (you can't make hardlinks to directories--well, you *can*, 
>but it's a bad idea) and a symlink has its own inode as well.
>
>> The author lists about eight directories. While I realize that some 
>> variance is to be expected, my SuSE 8.2 installation only the single
>> directory. Is this a normal result and I am confused by the
>> difference.
>
>It's possible that the IBM tutorials in this case depend on older 
>behavior of ls.  "ls --version" reports "coreutils 5.0" for me.
>
>> Oh wait, I am using the Rieser File System, maybe I should be using 
>> some other distro to follow this tutorial.
>
>ReiserFS, ext3, and FAT32 give me the same results, so it's not anything 
>to do with the filesystem.  
>
>-- 
>   Stupidity got us into this mess--why can't it get us out?
>There is no Darkness in Eternity/But only Light too dim for us to see
>
>
>------------------------------
>
>_______________________________________________
>linux-user mailing list
>linux-user at egr.msu.edu
>http://www.egr.msu.edu/mailman/listinfo/linux-user
>
>
>End of linux-user Digest, Vol 7, Issue 21
>***************************************** 

I believe you have what is expected. In strict terms, a file name is 
only a reference to an inode; you can multiple references (file 
names) for the same inode, so called hard link once they are 
on the same filesystem. Essentially the -d flag tell the ls to 
look for the directories itself, not their contents (files, sub-directories, etc).

Regards,
PWald 

---
On Reiserfs we trust
There is no Darkness in Eternity/But only Light too dim for us to see.

------------------------------------------------------------------------------------
GNU/Linux Registered User #  223296 
ICQ UIN: 14372714
Mobile: 
url: http://members.ispwest.com/wald

 ======= GNU/Linux ===================
     ,           ,
    /             \
   ((__-^^-,-^^-__))
    `-_---' `---_-'
     `--|o` 'o|--'
        \  `  /      GNU is Not Unix!
         ): :(       Debian Potato 2.2
         :o_o:
          "-"
 #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#



More information about the linux-user mailing list