I have noticed some config files having a prefix. E.g. Inside my
Could someone explain this? I am thinking something along the lines of file permissions or list order.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
It's to do with order of inclusion (list order).
The config snippets will be iterated over one at a time to produce the full set of configuration options for the application.
By adding the numbers at the beginning of each filename it allows shell scripts (and other types of programs) to easily grab the directory listing and then process the scripts in the order you want.
Some other examples:
/etc/apt/apt.conf.d/ /etc/systcl.d/ /etc/rc*.d/ /etc/fonts/conf.avail/ /etc/fonts/conf.d/ /etc/udev/rules.d/
For some daemons the file permissions and/or the file extension may also determine if the file is included.
This is only used in multiple conf file environment, which are conventionaly
The order of inclusion depends on the alphabetical order.
So with a notation in
.conf files will be treated is the order you have in mind.
I don't think any other notation will be refused. But it may depend of the software using them.
So, the order of inclusion will be :
00-httpd.conf 01-cgi.conf 02-personnal.conf
But it could also be :
man run-parts It says, in part:
NAME run-parts - run scripts or programs in a directory SYNOPSIS run-parts [--test] [--verbose] [--report] [--lsbsysinit] [--regex=RE] [--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--version] [--list] [--reverse] [--] DIRECTORY run-parts -V DESCRIPTION run-parts runs all the executable files named within constraints described below, found in directory directory. Other files and directories are silently ignored.