Skip to content

Instantly share code, notes, and snippets.

@Nora-Ballard
Last active July 5, 2016 09:51
Show Gist options
  • Save Nora-Ballard/ee6470b01d9bd0a24660 to your computer and use it in GitHub Desktop.
Save Nora-Ballard/ee6470b01d9bd0a24660 to your computer and use it in GitHub Desktop.

List disks (OSX)

diskutil list

Single Drive

sudo dd if=~/test.img of=/dev/rdisk2 bs=1m

Single Drive with Progress

pv ~/test.img | sudo dd of=/dev/rdisk2 bs=1m

Multiple Drives

pv ~/test.img | tee >(sudo dd of=/dev/rdisk2 bs=1m) | tee >(sudo dd of=/dev/rdisk3 bs=1m) | sudo dd of=/dev/rdisk4 bs=1m

Notes:

  • For OSX /dev/rdisk is faster than /dev/disk
  • Is faster when given a block size (bs=1m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment