/ Published in: Bash
                    
                                        
Creare un disco in RAM
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
#!/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
Comments
 Subscribe to comments
                    Subscribe to comments
                
                