LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-06-2010, 04:48 PM   #1
Rodnower
Member
 
Registered: Mar 2010
Posts: 54

Rep: Reputation: 15
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.

Last edited by Rodnower; 08-07-2010 at 03:33 AM.
 
Old 08-06-2010, 05:52 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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.
 
Old 08-07-2010, 03:32 AM   #3
Rodnower
Member
 
Registered: Mar 2010
Posts: 54

Original Poster
Rep: Reputation: 15
Thank you for reply.

Quote:
Originally Posted by AlucardZero View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the exact diff between init 1,init S and init s challavijay Linux - Newbie 1 08-05-2010 06:51 AM
/sbin/init: Kernel panic - not syncing: Attempted to kill init! jalejo08 Linux - Kernel 7 07-02-2009 01:16 PM
kernal panic no init found try passing init option to kernel m2azer Linux - General 3 11-08-2007 01:51 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration