Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

appa14

macrumors newbie
Original poster
Jun 8, 2022
6
0
Hi everyone, I have the following question and I hope there is a way (or some software) to do this:

I would like to format and name 10 USB flash drives (connected through a USB hub) that came right out of the package into ''OS X Extended Journaled'' and ''GUID Partition scheme'' with the name: USBdrive (or any other name, that's not important).

Doing it one by one is very slow as you have to wait for one to finish before you can format the next one with disk utility.
Is there a command where you can format 10 drives at the same time with the same name? There must be a way, but I can't find this question anywhere so therefore I am posting this question.

Thanks in advance for any advice.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,279
13,378
I don't ever recall seeing any way to do this.
One-at-a-time seems to be the only way.
 

bogdanw

macrumors 603
Mar 10, 2009
6,144
3,042
From Terminal
Code:
diskutil list physical
then new Terminal window for each
Code:
diskutil eraseDisk JHFS+ USBdrive10 GPT /dev/disk10
 

appa14

macrumors newbie
Original poster
Jun 8, 2022
6
0
Hi, I am looking for a way to format a USB flash drive through Terminal, and also create a partition on the drive in the GUID partition table.

For example:
Let say I want to format a USB flash drive with:
name: usbdrive
format: Mac OS X Extended Journaled
Partition scheme: GUID Partition

How would the terminal command look? Is this possible within one terminal command? and if so: is it also possible to format 10 USB drives in the same way with just one command (all USB drives connected through my 10 port USB HUB). This to avoid having to do all of them one by one with Disk utility, which is very slow.

Thanks for any help in advance ! :)
 

bogdanw

macrumors 603
Mar 10, 2009
6,144
3,042
For example:
Let say I want to format a USB flash drive with:
name: usbdrive
format: Mac OS X Extended Journaled
Partition scheme: GUID Partition
How would the terminal command look?

Like this
Code:
diskutil eraseDisk JHFS+ usbdrive GPT /dev/disk10

where /dev/disk10 is the USB drive you identify by running the command
Code:
diskutil list physical
 

appa14

macrumors newbie
Original poster
Jun 8, 2022
6
0
Like this
Code:
diskutil eraseDisk JHFS+ usbdrive GPT /dev/disk10

where /dev/disk10 is the USB drive you identify by running the command
Code:
diskutil list physical
Does that erase and partition the drive in one command? I assume the GPT means the GUID partition table? Is there a way to do multiple USB drives at once? Thanks
 

appa14

macrumors newbie
Original poster
Jun 8, 2022
6
0
I have figured out when I have 10 drives, I paste the commands like this and press enter:
diskutil eraseDisk JHFS+ usbdrive GPT /dev/disk2
diskutil eraseDisk JHFS+ usbdrive GPT /dev/disk3
diskutil eraseDisk JHFS+ usbdrive GPT /dev/disk4

And so on so on. And then it erases all the disks right after finishing the one before. So right after each other. That works.

There is no way to format/partition them all at once?
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.