On Sat, Feb 16, 2002 at 12:02:40PM -0500, doug waud wrote:
I then went back to an old UNIX manual and did some more reading :-) and tried
root@233p5:/ > ls -il /etc/init.d/boot.local 274722 -rwxr--r-- 1 root root 447 Jan 30 16:37 /etc/init.d/boot.local root@233p5:/ > ls -il /etc/rc.d/boot.local 274722 -rwxr--r-- 1 root root 447 Jan 30 16:37 /etc/rc.d/boot.local
and, miracles still happen, got the same inodes for both files. So it looks like we have a hard link. However, we still have 1 and not 2 :-)
Aha - there's the confusion. There's no problem here - boot.local only has one directory entry (aka hardlink) pointing to it. /etc/init.d/ is a directory which contains a directory entry that maps the name boot.local to inum 274722. /etc/rc.d/ is *not* a directory, but rather a symlink. symlinks do not contain any information about that to which they point except the name, so it has no idea if it's pointing to a file, directory, dev entry, etc. So, when /etc/rc.d/foobar is opened, the symlink is hit and replaced with the contents of it's target -> /etc/init.d/foobar, and the entry foobar is looked up in the directory /etc/init.d/ Make sense? -- Frank Sweetser fs at wpi.edu, fs at suave.net | $ x 16 Full-time WPI Network Tech, Part time Linux/Perl guy | Tactical? TACTICAL!?!? Hey, buddy, we went from kilotons to megatons several minutes ago. We don't need no stinkin' tactical nukes. (By the way, do you have change for 10 million people?) --lwall