Make a RAM or Scratch Disk in Mac OS X
Making a RAM disk prior to Mac OS X was quickly accomplished through a control panel, but since OS X this ability has been lost. Esperance DV replicates this GUI based creation of RAM disks with a simple system preference pane add-on that allows you the same functionality.
If you’d rather not download anything, you can follow our command line instructions to using no third party downloads or utilities, only the Terminal.
In Mac OS 9
Type the following exactly in the Terminal (the $ represents a bash prompt and is not to be typed):
$ hdid -nomount ram://52428800 $ newfs_hfs /dev/disk1 $ mkdir /tmp/ramdisk1 $ mount -t hfs /dev/disk1 /tmp/ramdisk1
to ditch the RAM disk and unmount it, just type
$ hdiutil detach /dev/disk1
In Mac OS X 10.5 or later
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
This has been tested and works in OS X 10.5.8, note that to remove the RAM disk you can simply eject it from the desktop as you would any other disk.