LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   please explain about rc.d file (https://www.linuxquestions.org/questions/linux-newbie-8/please-explain-about-rc-d-file-758630/)

shaiva 09-30-2009 04:06 AM

please explain about rc.d file
 
I want to know whether every shell scipt file ends with .sh and
want to know much about rc.d file ?Can you exaplin please

lemon09 09-30-2009 04:09 AM

Quote:

Originally Posted by shaiva (Post 3701579)
I want to know whether every shell scipt file ends with .sh and
want to know much about rc.d file ?Can you exaplin please

for shell scripts it does end with .sh extension...
for rc.d do a little bit of googling.

Trickie 09-30-2009 04:50 AM

File extensions aren't as important in the unises as they are in some other well known OSs; so a shell script does not *need* to have a .sh extension, but it does provide a form of ID for the developer. So the answer to your question is no.

The rc.d, if it exists, is a directory -- not a file; it is distro-dependent. It usually contains init.d which holds all the boot scripts, all the run-level symlinks, and rcsysinit.d.

HTH

Richard

chrism01 09-30-2009 07:40 PM

As per Trickie, and to expand, it's a convention (like the .sh thing) that if an entry under /etc ends in '.d' then it's a actually a dir, not a file.
Strictly speaking, under *nix, file extensions are a matter of (optional) convention, but because almost everybody uses them (and some tools recognise certain ones by default), it's as well to keep using them.

You may find these useful:

http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html

When in doubt, use the file cmd http://linux.die.net/man/1/file before trying to open/read a file.

Welcome to LQ
:)


All times are GMT -5. The time now is 01:54 AM.