Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Great news! Plus an easier way.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Great news! Plus an easier way.
Authored by: GaelicWizard on Jun 01, '02 08:29:15PM

this is a great tip, but here's my problem:
how can I make this all happen automatically?
and not with an applescript, from the command line. I want to make this happen at boot, so I can set my browsers to default ot this and so I can build on it all without having to do it manually beforehand.
Thanx in advance.

JP



[ Reply to This | # ]
UNIX script --This is what happens when i'm REALLY bored.
Authored by: GaelicWizard on Jun 02, '02 01:55:59AM

Me again, I answered my own question. I don't know how efficient it is, but here's my script:


#!/bin/sh

echo -n "/dev/r" > /tmp/RamDisk.raw
hdid -nomount ram://10240 | awk -F / '{print $3}' > /tmp/RamDisk
cat /tmp/RamDisk >> /tmp/RamDisk.raw
newfs_hfs `cat /tmp/RamDisk.raw`
echo -n "/dev/" > /tmp/RamDisk.mount
cat /tmp/RamDisk >> /tmp/RamDisk.mount
hdiutil mount `cat /tmp/RamDisk.mount`



obviously, replace the 10240 with the size you want for your disk.

JP



[ Reply to This | # ]
UNIX script --This is what happens when i'm REALLY bored.
Authored by: robh on Jun 03, '02 09:28:03AM
I've made a Perl script to call the necessary commands: download it here Unlike the other suggestions so far, this one also lets you specify the name of the disk and does some error simple error checking. Usage: ramdisk MB_size [name] e.g. ramdisk 10 mydisk ramdisk 20 If you don't give a name, it defaults to "untitled".

[ Reply to This | # ]