Last active
October 26, 2015 17:25
-
-
Save tian-im/a1cc3558dced6ac7d571 to your computer and use it in GitHub Desktop.
Burn ISO to external volume in Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
burn_iso () { | |
if [[ -z $1 ]] || [[ -z $2 ]]; then | |
echo 'usage: burn_iso IDENTIFIER PATH_TO_ISO' | |
echo 'hint: you could use `diskutil list` to find out the desired identifier.' | |
return | |
fi | |
# @see http://osxdaily.com/2015/06/05/copy-iso-to-usb-drive-mac-os-x-command/ | |
# 1. find out the identifier using `diskutil list` | |
# 2. unmount the drive | |
sudo diskutil umount /dev/$1 | |
# 3. burn iso | |
sudo dd if=$2 of=/dev/r$1 bs=1m | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment