Created
November 14, 2011 14:13
-
-
Save voyeg3r/1364022 to your computer and use it in GitHub Desktop.
Script to put firefox cache in ram
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 | |
# HOW TO: Firefox cache in ramdisk (tmpfs) | |
# http://ubuntuforums.org/showthread.php?t=991205 | |
# https://wiki.archlinux.org/index.php/Firefox_Ramdisk | |
# download: wget -c https://raw.github.com/gist/1364022/ -O firefox-cache-to-ram.sh && chmod +x $_ | |
clear | |
echo 'Seu usuário tem que ser sudo user !' | |
read -p "Feceh o fiefox ou terá surpresa desagradável " read | |
pkill firefox | |
FILE=`find ~/.mozilla/ -iname "*.default"`/user.js | |
[ -f $FILE ] || > $FILE | |
echo 'user_pref("browser.cache.disk.parent_directory", "/dev/shm/firefox-cache");' >> $FILE | |
# As your firefox profile is now placed placed in a RAM Disk, | |
# we need to limit the disk cache size. | |
# This limitation will save some memory and will also limit | |
# the time taken by backup & restore that will take place at every boot & shutdown. | |
echo 'user_pref("browser.cache.disk.enable", true);' >> $FILE | |
echo 'user_pref("browser.cache.disk.capacity", 16384);' >> $FILE | |
echo 'user_pref("browser.cache.offline.enable", false);' >> $FILE | |
mount -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment