使用udevadm阅读在bash USB串行code [英] read usb serial code in bash using udevadm
本文介绍了使用udevadm阅读在bash USB串行code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用用udevadm命令的bash读取USB唯一的ID。
使用的命令是:
I am trying to read usb unique id in bash using using udevadm command. used command is:
udevadm info --query=all --name=/dev/sdc1
输出是正确的,而使用普通的USB存储器,
output is proper while using a regular usb storage,
E: ID_SERIAL=JetFlash_Transcend_2GB_7FYD0N04-0:0
E: ID_SERIAL_SHORT=7FYD0N04
但是当我使用一个mp3播放器,输出就像是一个奇怪的现象:
But when i use a mp3 player, output is something odd like:
E: ID_SERIAL=10d6_USB_2.0_FS__FLASH_DISK_USB_2.0_FS__FLASH_DISK
E: ID_SERIAL_SHORT=USB_2.0_FS__FLASH_DISK
是否有USB存储一些独特的东西比其他ID_SERIAL_SHORT?
Is there some thing unique other than ID_SERIAL_SHORT for a usb storage?
感谢
推荐答案
有没有独特的USB序列号。每个供应商在自己的意愿选择codeS。有没有USB_SERIAL许多设备都没有。
There are no unique USB serial numbers. Each vendor selects codes at his own will. There are many devices without USB_SERIAL at all.
这篇关于使用udevadm阅读在bash USB串行code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文