In linux, why are folders for configuration files always named *.d?

Say

  • /etc/init.d
  • /etc/grub.d
  • /etc/apparmor.d
link|improve this question
1  
AskUbuntu has the answer to your question. – Mehper C. Palavuzlar Jan 7 '11 at 13:00
So does the Linux and Unix StackExchange site: unix.stackexchange.com/questions/4029/… – frabjous Jan 7 '11 at 16:51
This same question was asked on Server Fault about 8 hours ago. – Dennis Williamson Jan 7 '11 at 18:50
feedback

1 Answer

up vote 13 down vote accepted

The .d stands for directory. It is a convention to distinguish the directory-based configuration from a configuration based on a single configuration file. Often you will have both in some capacity, for example /etc/logrotate.conf and /etc/logrotate.d/.

It is also usually the case that all (reasonably-named) files in such a directory are automatically combined into a single configuration. Packages can then install files into a directory like that, and they will be used automatically. Again, /etc/logrotate.d/ is a good example. By constrast, a directory of configuration files that does not end in .d probably just contains random collation of configuration files belonging to the same package, and you cannot infer anything about how they are processed, example /etc/zsh/.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.