Last active
February 10, 2019 08:13
-
-
Save shikhir-arora/560d17153688d65a4700d98c62450351 to your computer and use it in GitHub Desktop.
[macOS] Quick script to move caches of some applications to memory (via. a APFS ramdisk volume mounted at /Volumes/ramdisk-apfs)
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 | |
CACHEDIR="/Volumes/ramdisk-apfs" # set our home path for the ramdisk-apfs as the CACHEDIR variable | |
############################################################################# | |
# Chrome Cache | |
/bin/rm -rvf ~/Library/Caches/Google/Chrome/* | |
/bin/mkdir -pv $CACHEDIR/Google/Chrome/Default | |
/bin/ln -v -s $CACHEDIR/Google/Chrome/Default ~/Library/Caches/Google/Chrome/Default | |
# Spotify Cache | |
/bin/rm -rvf ~/Library/Caches/com.spotify.client | |
/bin/mkdir -pv $CACHEDIR/Spotify | |
/bin/ln -v -s $CACHEDIR/Spotify ~/Library/Caches/com.spotify.client | |
# discordcanary Cache | |
/bin/rm -rvf /Users/shikhirarora/Library/Application\ Support/discordcanary/Cache | |
/bin/mkdir -pv $CACHEDIR/discordcanaryram/Cache | |
/bin/ln -v -s $CACHEDIR/discordcanaryram/Cache /Users/shikhirarora/Library/Application\ Support/discordcanary/Cache | |
# discordcanary localstorage | |
/bin/rm -rvf /Users/shikhirarora/Library/Application\ Support/discordcanary/Local\ Storage | |
/bin/mkdir -pv $CACHEDIR/discordcanaryram/Local\ Storage | |
/bin/ln -v -s $CACHEDIR/discordcanaryram/Local\ Storage /Users/shikhirarora/Library/Application\ Support/discordcanary/Local\ Storage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment