How to find USB device in Linux


I wondered when I had to find the USB device name in Linux using shell script (shell command), it was little tricky, specially in case of UDEV. You can use different methods to get this like using udevinfo command, from sysfs, from /var/log/messages. Using udevinfo: for DEV in /dev/sd*; do udevinfo -q env -n $DEV…