[转]ubuntu udevinfo 命令

原文地址:http://hi.baidu.com/rhca/blog/item/2a00481613146e4321a4e95f.html

 

root@ubuntu-T61:~# udevadm info -q path -n /dev/sda
/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
root@ubuntu-T61:~# udevadm info -q path -n /dev/sda1
/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
root@ubuntu-T61:~#

 

注: udevadm 后面的路径参数必须为绝对参数

Writing udev rules

by Daniel Drake (dsd)
Version 0.74

The most recent version of this document can always be found at:
http://www.reactivated.net/writing_udev_rules.html

Contents

  • Introduction
    • About this document
    • History
  • The concepts
    • Terminology: devfs, sysfs, nodes, etc.
    • Why?
    • Built-in persistent naming schemes
  • Rule writing
    • Rule files and semantics
    • Rule syntax
    • Basic rules
    • Matching sysfs attributes
    • Device hierarchy
    • String substitutions
    • String matching
  • Finding suitable information from sysfs
    • The sysfs tree
    • udevinfo
    • Alternative methods
  • Advanced topics
    • Controlling permissions and ownership
    • Using external programs to name devices
    • Running external programs on certain events
    • Environment interaction
    • Additional options
  • Examples
    • USB Printer
    • USB Camera
    • USB Hard Disk
    • USB Card Reader
    • USB Palm Pilot
    • CD/DVD drives
    • Network interfaces
  • Testing and debugging
    • Putting your rules into action
    • udevtest
  • Author and contact

Introduction

About this document

 

你可能感兴趣的:([转]ubuntu udevinfo 命令)