I want to burn a .img file of Wheezy OS to my 8GB SD Card from Mac OS X but can't figure out how.

Any help would be appreciated.
['https://raspberrypi.stackexchange.com/questions/4144', 'https://raspberrypi.stackexchange.com', 'https://raspberrypi.stackexchange.com/users/-1/']
Yes the simple answer is to just [dd](http://linux.die.net/man/1/dd) it, but there are some safety precautions you may want to enforce by wrapping your dd in a script;

```
#!/bin/bash

#
# copy_img_to_sd.sh
#

ME=$( id | grep root | wc -l | perl -p -e 's/[^0-9]+//g');
if [ "$ME" != "1" ] ;then
    echo "must be root"
    exit 1;
fi
IMG=$1
if [ ! -f $IMG ] ;then
    echo "can not find $IMG";
    exit 2;
fi 
DISK=$(ls -l /dev/disk? | wc -l |perl -p -e 's/[^0-9]//g')
if [ $DISK -lt 3 ] ; then
    echo "can not find sdcard";
    ls -l /dev/disk?
    exit 2;
fi
DISK=$(ls -1 /dev/disk? | tail -1);
R_DISK=$(ls -1 /dev/rdisk? | tail -1);
echo "we are about to do this:"
echo $(diskutil information $DISK | grep Total)
ls -1 /dev/disk?s* | grep "$DISK" | perl -p -e 's/^(.*)$/diskutil unmount $1;/g'
echo dd bs=1m if=$IMG of=$R_DISK
echo sync
echo diskutil eject $R_DISK
echo "Press [enter] to continue or [Ctrl]+[C] to cancel";
read YNM;
ls -1 /dev/disk?s* | grep "$DISK" | perl -p -e 's/^(.*)$/diskutil unmount $1;/g' | bash 2>/dev/null
dd bs=1m if=$IMG of=$R_DISK
sync
diskutil eject $R_DISK

```

Accidentally writing an image to your internal drive will require a fresh OS X install to correct. Backup and keep an install.log so if it ever happens to you you can laugh it off.
Use `df` to find the device path, in this case `/dev/disk2`.

```
$ df -h

Filesystem      Size   Used  Avail Capacity   iused    ifree %iused  Mounted on
/dev/disk1     465Gi  414Gi   51Gi    90% 108573777 13263821   89%   /
devfs          214Ki  214Ki    0Bi   100%       741        0  100%   /dev
map -hosts       0Bi    0Bi    0Bi   100%         0        0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%         0        0  100%   /home
/dev/disk2s1   3.7Gi  2.3Mi  3.7Gi     1%         0        0  100%   /Volumes/UNTITLED

```