Skip to content

Instantly share code, notes, and snippets.

@sgray10
Created September 19, 2015 23:25
Show Gist options
  • Save sgray10/ab940a51d9fcb1dc48d5 to your computer and use it in GitHub Desktop.
Save sgray10/ab940a51d9fcb1dc48d5 to your computer and use it in GitHub Desktop.
Fast dd in OS X
seg$ diskutil unmountDisk /dev/disk1
seg$ sudo dd bs=1m if=somefile.iso of=/dev/rdisk1
From man hdiutil:
/dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code.
References:
http://daoyuan.li/solution-dd-too-slow-on-mac-os-x/
http://superuser.com/questions/631592/mac-osx-why-is-dev-rdisk-20-times-faster-than-dev-disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment