# number of 512K blocks you need: # numblocks = (image size in MB) * 2048 # for example: 5MB = 10240 blocks #numblocks=2048000 #hdid -nomount ram://$numblocks #newfs_hfs /dev/disk1 #mount -t hfs /dev/disk1 /Users/ks/Projekte/epilog/work/store #!/bin/bash #if [ -n “$2″ ]; then ARG_ERR=ERR; fi #if [ -z “$1″ ]; then ARG_ERR=ERR; fi #if [ -n “$ARG_ERR” ]; #then #echo 1 argument: size in MB #exit #fi MB_SIZE=2048000 #$1 #let MB_SIZE *= 2048 #echo Creating ${MB_SIZE} 512-blocks ramdisk #CREATED_RAMDISK=`hdid -nomount ram://${MB_SIZE}` #echo New block device: ${CREATED_RAMDISK} #DISK_NAME=`basename ${CREATED_RAMDISK}` #echo Creating volume with label: ${DISK_NAME} #newfs_hfs -v ${DISK_NAME} /dev/r$CREATED_RAMDISK #echo Mounting in /Volumes/${DISK_NAME} #mkdir /Volumes/${DISK_NAME} ##diskutil mount ${CREATED_RAMDISK} /Users/ks/Projekte/epilog/work/store ##mount -t hfs ${CREATED_RAMDISK} /Users/ks/Projekte/epilog/work/store #mount /dev/disk1 /Users/ks/Projekte/epilog/work/store #!/bin/bash VolumeName="rd_html" SizeInMB=1200 NumSectors=$((2*1024*SizeInMB)) DeviceName=`hdid -nomount ram://$NumSectors` echo $DeviceName diskutil eraseVolume HFS+ RAMDisk $DeviceName ln -s /Volumes/$DeviceName /Users/ks/Projekte/epilog/work/html #ln -s /Volumes/disk1 /Users/ks/Projekte/epilog/work/store #ln -s /Volumes/disk1 /Users/ks/Projekte/epilog/work/store ### hdiutil detach /dev/disk1