Get List of USB Drives in Linux Terminal, and mount them

Get List of USB Drives in Linux Terminal, and mount them

Get List of USB Drives in Linux Terminal, and mount them
Instead of using lsusb, use the following command to get a comma separated list of USB disk drives,

1
$ lsblk | grep “sd[^a]” | tail -n +2 | cut -c7-10 | sed ‘/^ $/d’ | paste -s -d,

This has been tested on ubuntu only.