• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)


  • Subject: Create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)
  • From: Alberto Carpenè <email@hidden>
  • Date: Sun, 02 Feb 2014 09:50:12 +0100

Hi,
I need to create an apple script to perform DD Commands in sequence, to replicate the same .img file to multiple USB flash drive

The context: the computer is connected to a powered USB hub with 7 usb flash drives connected and unmounted by diskutil. No other USB devices or disk are connected to the computer (so the USB Sticks will be assign a disk1 - disk7 resource mapping)

The steps

 - a file named  "source.img" will be prepared and put on the desktop (say an .img of a bootable OS)

 - terminal must be asked to change directory to the desktop

 - with administrative privileges (the password can be inserted into the script, or asked once to the user) it must be asked to perform:

"sudo dd if=source.img of=/dev/rdisk1 bs=1m"

- the script must wait until the operation is concluded, then ask the terminal to perform another DD, to disk2 this time:

"sudo dd if=source.img of=/dev/rdisk2 bs=1m"

and again, wait until the operation is concluded, and then ask:

"sudo dd if=source.img of=/dev/rdisk2 bs=1m"

and so on with rdisk3, rdisk4, rdisk5, rdisk6, rdisk7.

- at the end of the disk7 operation , the script can shut down the terminal and send a finder message to the user (or an audio notification) that the USB Duplication process to the 7 flash drives is concluded.

It's a way to create a "USB duplicator on the cheap" for bootable images to be put on multiple sticks, I need it for a school project to my students.

Anybody can help ? I am a zero with Applescript. And this thing will be useful for many.

Thank you !
Alberto
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Next by Date: Again (corrected): how to create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)
  • Next by thread: Again (corrected): how to create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)
  • Index(es):
    • Date
    • Thread