Created
July 14, 2014 20:53
-
-
Save rjzak/92af0b4e5c6e0a7d2160 to your computer and use it in GitHub Desktop.
Make a ramdisk on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 2 ] | |
then | |
mkdir $1 | |
mount -t tmpfs -o size=$2 tmpfs $1 | |
else | |
echo "Proper use: $0 <RAMDISK_DIR> <RAMDISK_SIZE>" | |
echo "Example: $0 /mnt/ramdisk 4096m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment