我目前正在Linux上探索目录树,同时通过我买的一本书来支持它。这本书明确地说:
/dev目录包含所有设备的特殊设备文件。设备文件是在安装期间创建的,稍后使用/dev/MAKEDEV脚本创建。/dev/MAKEDEV.local是由系统管理员编写的脚本,它只创建本地设备文件或链接(.)
我找不到那个脚本,我应该找到它还是它是在安装新设备时生成的?
发布于 2017-10-04 12:18:41
你的书写的时候是对的,但现在已经过时了。MAKEDEV过去是/dev中的脚本,可能由系统管理员编写的本地MAKEDEV.local作为补充;现在,如果它存在,则更有可能驻留在/sbin中。
许多当前的Linux系统根本没有MAKEDEV,它们依赖于内核和udev来根据需要填充设备节点。
有关为什么MAKEDEV脚本的名字在所有大写中拼写?历史的更多信息,请参见MAKEDEV。
发布于 2017-10-04 11:54:46
根据@StephenKitt的评论,这本书肯定已经过时了;参见为什么MAKEDEV脚本的名字在所有大写中拼写?。
实际上,MAKEDEV在/sbin/。从手册页:
Name
MAKEDEV - create devices
Synopsis
/sbin/MAKEDEV -V
/sbin/MAKEDEV [ -d directory ] [ -D directory ] [ -c configdir ] [ -m maxdevices ] [-a] [-n] [-v] [-i] [-M] [-S] [-u] [-x] " device ..."
Description
MAKEDEV is a program that will create the devices in /dev used to interface
with drivers in the kernel.
Note that programs giving the error ''ENOENT: No such file or directory''
normally means that the device file is missing, whereas ''ENODEV: No such
device'' normally means the kernel does not have the driver configured or loaded.https://unix.stackexchange.com/questions/396038
复制相似问题