Skip to content

Instantly share code, notes, and snippets.

@chrysalysm
chrysalysm / MoveTemporaryFoldersToRamdisk_MacOSX.sh
Last active May 12, 2018 18:49 — forked from pklaus/AlwaysMountRootFSWithNoatime_MacOSX.sh
Shell script to create RamDisk and move temp folders to RamDisk. Increased original RamFS values from 256/64 to 512/128. Moved startup item to /Library/StartupItems instead of /System/Library/StartupItems. https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/StartupItems.html
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Set up Mac OS X to store temporary files in RAM rather than on disk.|
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | |
# | Originally by Ricardo Gameiro <http://blogs.nullvision.com/?p=357> |
# | Changes by Daniel Jenkins |
import urllib2
import json
import time
import threading
import socket
import string
import os
import random
import traceback
import sys