[Ilugc] How to FInd Location of USB device.

  • From: a.kumar@xxxxxxxxxxxxxxxxx (Kumar Appaiah)
  • Date: Wed, 4 May 2011 23:20:28 -0500

On Wed, May 04, 2011 at 10:15:43AM +0530, Rajesh kumar wrote:

When we connect the usb device it will reside as /dev/sdb, /dev/sdc etc.,
We can find that using fdisk -l

Is there any command to list all the usb devices location, like below

Here's one for kernels 2.6.20 onwards:

ls -l /dev/disk/by-id/usb-*

I have no idea if this is foolproof. However, with my USB stick:

# ls -l /dev/disk/by-id/usb-*
lrwxrwxrwx 1 root root  9 May  4 23:17 
/dev/disk/by-id/usb-JetFlash_TS2GJFV30_7JGO3QAD-0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 May  4 23:17 
/dev/disk/by-id/usb-JetFlash_TS2GJFV30_7JGO3QAD-0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 May  4 23:17 
/dev/disk/by-id/usb-JetFlash_TS2GJFV30_7JGO3QAD-0:0-part2 -> ../../sdb2
           
HTH.

Kumar
-- 
:
####[ GNU/Linux One Stanza Tip (LOST) ]#######################

Sub : auto-apt: package installation tool [debian]   LOST #590

# apt-get install auto-apt 
Create db file for auto-apt
# auto-apt update          
Search for pattern in all packages, installed or not
$ auto-apt search pattern 

####[banduji (at) symonds.net]################################
:

Other related posts: