[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Command line mounting all partitions of pluggable device



On 01/14/2019 07:33 AM, rhkramer@gmail.com wrote:
On Monday, January 14, 2019 08:11:11 AM Richard Owlett wrote:
I have competing mount requirements.
I have 2 1TB USB drives with a dozen or more partitions, only one of
which may be of current interest. Disabling automoun is a suitable
solution to mounted clutter.

However I have several USB drives (64GB - 250GB) with multiple
partitions. How do I mount all partitions of a specific device
(e.g. /dev/sdc)?

TIA

Assuming there are entries in fstab for each partition,

There are not. I have a varying number of devices. Each device is normally associated with a specific function (e.g. sneaker-net) or personal project. A specific physical device may be reformatted and assigned a new purpose.

you could use a (bash) for loop, like:

for i in  /dev/sd<device_letter>*;  do  mount $i; done






Reply to: