Return to Snippet

Revision: 55440
at February 7, 2012 07:23 by kajinka13


Initial Code
#!/bin/sh

# Crea un disco RAM
function ramdisk() {
        sectors=$(($1*2048))
        dev=$(hdid -nomount ram://$sectors)
        mount=/tmp/ram${dev##*/}
        newfs_hfs $dev
        mkdir $mount
        mount -t hfs $dev $mount
}       

ramdisk $1

Initial URL

                                

Initial Description
Creare un disco in RAM

Initial Title
Creare un disco in RAM

Initial Tags
Bash

Initial Language
Bash