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

mrjayviper

macrumors regular
Original poster
Jul 17, 2012
245
27
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.
 

Attachments

  • Screen Shot 2015-07-02 at 12.16.03 PM.png
    Screen Shot 2015-07-02 at 12.16.03 PM.png
    77 KB · Views: 72
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.