Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

A lot of unix config files in xx.d folders are prefixed by a number, like :

$ ls /etc/grub.d/
00_header        10_linux      30_os-prober      40_custom  
05_debian_theme  20_linux_xen  30_uefi-firmware  41_custom

Is there any convention on this number? What does it mean ?

Might just be to avoid name clashing but I'm curious if there's anything more.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

It's a convention used both to keep filenames unique, and to control the order in which scripts get executed. In general, the xx.d directories are scanned by something doing the moral equivalent of for file in /etc/grub.d/*; do ... and the numeric prefixes give this an ordering other than alphabetical. There may be application-specific standards for what's a 4x_foo vs a 9x_foo but nothing consistent across all the xx.d directories.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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