udevinfo on Ubuntu 10.4 “Lucid”
来源:互联网 发布:淘宝中老年女装夏装 编辑:程序博客网 时间:2024/04/25 05:32
The latest versions of Ubuntu do not appear to have the tool udevinfo
anymore, which is vital to find information about devices connected to the computer.
There is, however, a new tool called udevadm
, and with a little syntax trick you can get it to spit out your familiar udevinfo syntax:
udevadm info -a -p `udevadm info -q path -n /dev/sdb`
shows:
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host5/target5:0:0/5:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="1"
(...)
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
If you use this more often and don’t like the idea of entering a huge line of code for such a simple command, drop the following into your .bashrc
file (all in one line):
udevinfo () { udevadm info -a -p `udevadm info -q path -n "$1"`; }
Now (after starting a new session or typing source ~/.bashrc
), a simple udevinfo /dev/sdb
will do the trick.
Also helpful: A long time ago, I wrote a blog post about udev rules, showing what rules I used at the time to have consistent device names for my USB drives, no matter in what order I connect or disconnect them. The devices I mention there are long gone, but I keep going back to that post every time I need to write a new udev rule.
- udevinfo on Ubuntu 10.4 “Lucid”
- [zz]Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04
- Using the 2.6.33-rt kernel series on Ubuntu Lucid
- running a 32bit executable on a 64 ubuntu lucid
- Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 LTS
- Install sun-java6-jdk on Ubuntu 10.04 (Lucid)
- Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS
- How to install Git on Ubuntu Lucid (10.04)
- ubuntu 10.4 lucid 电信更新源
- [转]ubuntu udevinfo 命令
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)?
- How to compile and debug VLC player source code in eclipse IDE on Ubuntu 10.04 (lucid)
- How to fix the adb no permissions error on Ubuntu Lucid
- Ubuntu 10.04 (Lucid) 更新源
- Middle Button Scroll and Disabling Touchpad on IBM Ultranav USB Keyboard SK-8845 – Ubuntu Linux 10.04 Lucid Lynx
- 惊艳的Ubuntu 10.04 Lucid Lynx
- Ubuntu 10.04 Lucid Lynx Beta 2发布
- Ubuntu 10.04 LTS (Lucid Lynx) 正式发布
- RedHat开启telnet服务
- 在ArcGIS Engine和ArcGIS SDE开发中使用NUnit单元测试
- 祝贺大家新年快乐
- 编辑框灰色预先提示,获得焦点清空等待输入
- 链接
- udevinfo on Ubuntu 10.4 “Lucid”
- 如何获取树节点目前是折叠还是展开状态
- 对接收数组参数的成员方法进行反射.avi
- CFILEFIND的排序——递归与循环遍历目录中函数的剥离
- 枚举细解
- 【shell】统一修改某一路径上目录的权限
- 实体关系图(数据库资料)
- 关于mbstring的一些问题处理
- win2003 匿名访问 文件夹 共享的实现