Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
d0m2o08
V2EX  ›  Linux

Linux 下一些配置文件以数字开头,这些数字有什么特殊含义么?

  •  
  •   d0m2o08 · Apr 9, 2021 · 3664 views
    This topic created in 2033 days ago, the information mentioned may be changed or developed.
    比如
    /etc/sysctl.d/99-sysctl.conf

    这里的 99 有啥含义么
    5 replies  •  2021-04-14 02:04:42 +08:00
    12101111
    12101111
    Apr 9, 2021❤️1
    1
    按 ASCII 顺序加载的, 都以数字开头就是小的优先
    yanqiyu
    yanqiyu
    Apr 9, 2021❤️1
    2
    *.d/* 这种配置文件模式一般按照文件名顺序加载,数字能保证这个顺序看起来更直观
    necomancer
    necomancer
    Apr 9, 2021❤️1
    3
    调执行顺序的吧,不一般对应的.conf 里都是 for file in xxx.d/*.conf 这样,用数字控制执行顺序,而不是文件名字母排序。
    whee1
    whee1
    Apr 9, 2021 via iPhone
    4
    因为数字一般在码序中靠前。
    中文环境以码序作为默认顺序其实有点“难看”,这时候你需要单独设置 LC_MESSAGE 环境变量。
    而配置文件为什么这么命名,要讨论就会涉及到历史问题,搞不好会出现“党”争...
    flynaj
    flynaj
    Apr 14, 2021 via Android
    5
    前面的数字就是执行顺序。 最常见的是在 rc.d 目录下面的那些
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3742 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 00:46 · PVG 08:46 · LAX 16:46 · JFK 19:46
    ♥ Do have faith in what you're doing.