LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   What type of connection is between files in /etc/init.d and /etc/rc.d/init.d? (http://www.linuxquestions.org/questions/linux-general-1/what-type-of-connection-is-between-files-in-etc-init-d-and-etc-rc-d-init-d-824663/)

Rodnower 08-06-2010 04:48 PM

What type of connection is between files in /etc/init.d and /etc/rc.d/init.d?
 
Hello, I know what this two listed above directories are. But I really don't understand what connect between files in them. I mean that:
any of them isn't symbolic link:
I don't see: '->' indicator in ls -l that say to where file links
any of them isn't hard link:
the hard link counter in ls -l is 1

Here is some outputs:
[root@andreys-comp init.d]# pwd
/etc/init.d
[root@andreys-comp init.d]# ls -l xfs
-rwxr-xr-x 1 root root 3902 Jul 12 2007 xfs

[root@andreys-comp init.d]# pwd
/etc/rc.d/init.d
[root@andreys-comp init.d]# ls -l xfs
-rwxr-xr-x 1 root root 3902 Jul 12 2007 xfs

Example of hard links. Put attantion to second column in ls output:
[root@andreys-comp init.d]# ln file1 file2
[root@andreys-comp init.d]# ls -l file*
-rw-rw-r-- 2 root root 0 Aug 7 00:42 file1
-rw-rw-r-- 2 root root 0 Aug 7 00:42 file2

Example of soft link. Put attention to '->' indicator in ls output:
[root@andreys-comp init.d]# ln -s file2 file3
[root@andreys-comp init.d]# ls -l file3
lrwxrwxrwx 1 root root 5 Aug 7 00:44 file3 -> file2

With all this, when I modify one of the files in one of the directories, automatically the appropriate file in second directory modifies too.

Any ideas?
Thank you for ahead.

AlucardZero 08-06-2010 05:52 PM

What about

ls -ld /etc/init.d
ls -ld /etc/rc.d/init.d

You don't mention what distro you're running. Mine doesn't have a /etc/rc.d/init.d.

Rodnower 08-07-2010 03:32 AM

Thank you for reply.

Quote:

Originally Posted by AlucardZero (Post 4058364)
What about

ls -ld /etc/init.d
ls -ld /etc/rc.d/init.d
/etc/rc.d/init.d.

The same thing:
[root@andreys-comp ~]# ls -ld /etc/init.d/
drwxr-xr-x 2 root root 4096 Aug 7 01:06 /etc/init.d/
[root@andreys-comp ~]# ls -ld /etc/rc.d/init.d/
drwxr-xr-x 2 root root 4096 Aug 7 01:06 /etc/rc.d/init.d/

I run CentOS 5.5.


All times are GMT -5. The time now is 09:35 PM.