每天进步一点点
全部博文(137)
分类: LINUX
2005-04-13 13:37:32
Udev allows you to customise the naming of device nodes. There are two reasons why you might want to do this: convenience, and persistent naming.
Default udev rules are stored in /etc/udev/rules.d/50-udev.rules.
You can creat your own rules in a file at /etc/udev/rules.d/10-local.rules
Example:
If I insert my U disk in fedora3 the system will creat a node automatically as /dev/sdb1
then #udevinfo -q path -n /dev/lp0
#/block/sdb/sdb1
then #udevinfo -a -p /sys/class/usb/lp0
You can find a detailed information about this U disk
vi your 10-local.rules addbo
BUS="usb", SYSFS{serial}="0000:00:07.2", NAME="U-disk"
You can find that your U disk will be detected as "U-disk"