I'm trying to make a script that will automate some things like erasing a USB stick and restoring a DMG file into it. I've found the command to erase a USB stick ("diskutil eraseDisk JHFS+ Untitled disk2"). But I haven't found something similar to restoring a DMG file into the stick.
I'm thinking this would involved mounting the DMG using hdiutil and then using dd?
Can someone help? thanks
ps. I've added a screenshot to detail what I'm talking about.
I'm thinking this would involved mounting the DMG using hdiutil and then using dd?
Can someone help? thanks
ps. I've added a screenshot to detail what I'm talking about.
Attachments
Last edited: