[Techtalk] How to view links to an inode?
txjulie at austin.rr.com
Wed Aug 27 19:43:17 EST 2003
Liz Young wrote:
> Hi List,
> "ls -idl /etc/X11" shows:
> 5675 drwxr-xr-x 31 root root 1184 Aug 27 09:33 /etc/X11
> so, there are 31 links to inode 5765.
> How can I view what links to inode 5765? I figured that it is the
> subdirectories under /etc/X11, including parent and current, but how to
> view just those?
> If there is an ls command, I'll be darned! ;-)
Do this --
find / -xdev -inum 5765 -print
The entries you =won't= see are the ".." entries of all the
subdirectories in /etc/X11. This is mine --
#server-> ls -ldi /etc/X11 /etc/X11/xsm/..
374625 drwxr-xr-x 18 root root 4096 Jun 15 20:22 /etc/X11
374625 drwxr-xr-x 18 root root 4096 Jun 15 20:22
So if you have 29 subdirectories you'll have 29 ".." entries
which are linked to /etc/X11. If you had /etc/X11 itself, plus
/etc/X11/. that makes 31.
Julianne Frances Haugh Life is either a daring adventure
txjulie at austin.rr.com or nothing at all.
-- Helen Keller
More information about the Techtalk