Find which drive corresponds to which USB mass storage device in Linux

后端 未结 4 1335
暗喜
暗喜 2021-01-06 01:14

I have several USB mass storage flash drives connected to a Ubuntu Linux computer (Ubuntu 10.04.1, kernel 2.6.32-25-386), and I need to tell them apart programatically (from

4条回答
  •  佛祖请我去吃肉
    2021-01-06 01:45

    I use the path:

    /sys/bus/usb/drivers/usb-storage/4-1:1.0/host4/target4:0:0/4:0:0:0/block/sda
    

    so you can see usb bus 4, port 1 is connected with a usb storage /dev/sda

提交回复
热议问题