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

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

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

24
Mar,2016

0

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,

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

Comments

comments

Leave a Reply