LinuxQuestions.org
Help answer threads with 0 replies.
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 09-22-2010, 04:41 PM   #1
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 68

Rep: Reputation: 11
.d directories


I'm trying to find information explaining directories ending with .d
 
Old 09-22-2010, 04:53 PM   #2
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado
Distribution: Slackware
Posts: 522

Rep: Reputation: 111Reputation: 111
http://wiki.linuxquestions.org/wiki/Run_Levels
 
Old 09-22-2010, 07:07 PM   #3
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 68

Original Poster
Rep: Reputation: 11
thanks greatly... But what of directories
/etc/apt/sources.list.d or /etc/grub.d and others
 
Old 09-22-2010, 07:42 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado
Distribution: Slackware
Posts: 522

Rep: Reputation: 111Reputation: 111
I use Slackware and it doesn't have those directories. Usually *.d directories have startup/shutdown scripts but that's not written in stone.
 
Old 09-23-2010, 04:52 AM   #5
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 68

Original Poster
Rep: Reputation: 11
I find these in ubuntu and debian systems. They appear to supplement configuration files. Or at least are associated with configurations.

I haven't been able to find any documentation or explanation as to how they actually work.

Thanks again
DJ
 
Old 09-23-2010, 05:12 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
The .d directories contain configuration files that used to be contained in a single configuration file.

Code:
/etc/aliases.d/          /etc/cron.d/    /etc/ld.so.conf.d/   /etc/named.d/        /etc/pptp.d/      /etc/reader.conf.d/  /etc/susehelp.d/
/etc/ant.d/              /etc/depmod.d/  /etc/logrotate.d/    /etc/netconfig.d/    /etc/products.d/  /etc/rsyslog.d/      /etc/tmpdirs.d/
/etc/apparmor.d/         /etc/gre.d/     /etc/lsb-release.d/  /etc/pam.d/          /etc/profile.d/   /etc/sane.d/         /etc/usb_modeswitch.d/
/etc/bash_completion.d/  /etc/init.d/    /etc/modprobe.d/     /etc/permissions.d/  /etc/rc.d/        /etc/slp.reg.d/      /etc/xinetd.d/
A service you install would previously edit the configuration file, such as xinetd.conf using sed or awk. There is a risk that the install script may modify it improperly changing the items for other services. Now the install script simply needs to drop it's part of configuration in the directory.

On recent distributions, this is even true for the xorg.conf file which is replaced with a file for each section in /etc/X11/xorg.conf.d/.
10-evdev.conf 11-mouse.conf 20-synaptics.conf 20-wacom.conf 50-device.conf 50-monitor.conf 50-screen.conf 50-vmmouse.conf 90-keytable.conf
 
Old 09-23-2010, 07:47 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Why do they end with .d?
 
Old 09-23-2010, 02:04 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I don't know if the .d stands for daemon or directory. I think this naming started with /etc/xinetd.d and became the conventional way of naming directories of configuration files for a single service. This naming convention may be given in one of the many Unix standards that Linux aims to comply with.
 
Old 10-08-2010, 07:05 PM   #9
djk44883
Member
 
Registered: Aug 2008
Location: Ohio
Distribution: debian
Posts: 68

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by jschiwal View Post
The .d directories contain configuration files that used to be contained in a single configuration file.


A service you install would previously edit the configuration file, such as xinetd.conf using sed or awk. There is a risk that the install script may modify it improperly changing the items for other services. Now the install script simply needs to drop it's part of configuration in the directory.
Thanks greatly for your respons! I haven't really been able to find any documentation beyond your post.

For unknown reasons I split each line in sources.list into individual files in sources.list.d and functions as expected.
DJ
 
Old 10-08-2010, 07:14 PM   #10
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
Quote:
Originally Posted by jschiwal View Post
I don't know if the .d stands for daemon or directory. I think this naming started with /etc/xinetd.d and became the conventional way of naming directories of configuration files for a single service. This naming convention may be given in one of the many Unix standards that Linux aims to comply with.
Yes, and the main reason is that it makes it easier for a distro
or an administrator to add a new configuration safely. When
everything is written to a single file, it's possible that an
installation or uninstallation will have unintended effects on
other entries. When each entry is in its own file, adding or
removing an entry will have no effect on other entries.

I've always assumed the .d stands for directory, since the old
rc.d directories weren't for an individual daemon. I haven't
seen this in print, so it's just a guess.
 
  


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
Copying files and sub-directories of a directory except the directories named ".abc" sri1025 Linux - General 2 08-24-2010 08:53 AM
How do I copy over directories to directories with the same name without overwriting? SentralOrigin Linux - General 1 03-14-2009 01:09 AM
Moving directories to new directories keysorsoze Linux - Newbie 2 03-31-2006 07:14 PM
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM

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

All times are GMT -5. The time now is 07: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