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

后端 未结 4 1301
暗喜
暗喜 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:49

    Here is how I do it.

    lsusb -v shows all the devices disks get an iserial number take note of them

     ls -l /dev/disk | grep [iserial] 
    

    Everything in /dev/disk is a symlink so follow the symlink to see the device.

提交回复
热议问题