LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-30-2009, 05:06 AM   #1
shaiva
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Rep: Reputation: 0
Post 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
 
Old 09-30-2009, 05:09 AM   #2
lemon09
Member
 
Registered: Jun 2009
Location: kolkata,India
Distribution: Mandriva,openSuse,Mint,Debian
Posts: 285
Blog Entries: 1

Rep: Reputation: 37
Quote:
Originally Posted by shaiva View Post
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.
 
Old 09-30-2009, 05:50 AM   #3
Trickie
Member
 
Registered: Sep 2004
Posts: 38

Rep: Reputation: 23
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
 
Old 09-30-2009, 08:40 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could somebody explain the pros and cons of some of the most used file systems? baldurpet Linux - General 20 12-11-2008 09:39 PM
Deleting a 28gb log file has no impact on disk usage, can someone explain why? Andrew.Johnstone Linux - General 3 10-21-2008 06:50 AM
where can find file "/etc/init.d/functions " detail explain cnhawk386 Linux - Software 3 09-20-2007 11:44 AM
explain the ( very messy ) unix file system ? xconspirisist Linux - General 11 10-16-2003 01:52 PM


All times are GMT -5. The time now is 08:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration