Disk Utility restore function alternative using terminal?

Discussion in 'macOS' started by mrjayviper, Jul 1, 2015.

  1. mrjayviper, Jul 1, 2015
    Last edited: Jul 1, 2015

    mrjayviper macrumors regular

    Joined:
    Jul 17, 2012
    #1
    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.
     

    Attached Files:

  2. mrjayviper thread starter macrumors regular

    Joined:
    Jul 17, 2012

Share This Page