부팅시 자동으로 램디스크를 생성하고, 사용자가 지정한 쉘스크립트를 실행하는 기능이 있어 아래와 같은 스크립트를 작성해서 활용하고 있다.
#!/bin/bash CACHEDIR="/Volumes/RamDisk" # 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 # Chrome Canary Cache /bin/rm -rvf ~/Library/Caches/Google/Chrome\ Canary/* /bin/mkdir -pv $CACHEDIR/Google/Chrome/Canary/Default /bin/ln -v -s $CACHEDIR/Google/Chrome/Canary/Default ~/Library/Caches/Google/Chrome/Canary/Default # Safari Cache /bin/rm -rvf ~/Library/Caches/com.apple.Safari /bin/mkdir -pv $CACHEDIR/Apple/Safari /bin/ln -v -s $CACHEDIR/Apple/Safari ~/Library/Caches/com.apple.Safari # Fireforx Cache /bin/rm -rvf ~/Library/Caches/Firefox /bin/mkdir -pv $CACHEDIR/Firefox /bin/ln -v -s $CACHEDIR/Firefox ~/Library/Caches/Firefox # iTunes Cache /bin/rm -rvf ~/Library/Caches/com.apple.iTunes /bin/mkdir -pv $CACHEDIR/Apple/iTunes /bin/ln -v -s $CACHEDIR/Apple/iTunes ~/Library/Caches/com.apple.iTunes # 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 # Transmit /bin/rm -rvf ~/Library/Caches/Transmit /bin/mkdir -pv $CACHEDIR/Transmit /bin/ln -v -s $CACHEDIR/Transmit ~/Library/Caches/Transmit # IntelliJ /bin/rm -rvf ~/Library/Caches/IntelliJIdea2018.1 /bin/mkdir -pv $CACHEDIR/IntelliJIdea2018.1 /bin/ln -v -s $CACHEDIR/IntelliJIdea2018.1 ~/Library/Caches/IntelliJIdea2018.1 # VisualStudio /bin/rm -rvf ~/Library/Caches/VisualStudio /bin/mkdir -pv $CACHEDIR/VisualStudio /bin/ln -v -s $CACHEDIR/VisualStudio ~/Library/Caches/VisualStudio # Xamarin /bin/rm -rvf ~/Library/Caches/Xamarin /bin/mkdir -pv $CACHEDIR/Xamarin /bin/ln -v -s $CACHEDIR/Xamarin ~/Library/Caches/XamarinIntelliJ의 경우 디렉토리명에 버젼이 기재되기 때문에 업데이트가 될때마다 디렉토리명을 변경해 주어야 한다.
새댓글 등록