Created
February 13, 2014 20:14
-
-
Save pkutzner/8982939 to your computer and use it in GitHub Desktop.
Script to clear out Safari caches
This file contains hidden or 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 | |
set -o nounset | |
pgrep Safari >/dev/null 2>&1 && { echo "Safari is still running, exiting..." | logger -t "privacy.sh"; exit 1; } || { echo "Removing Safari history/caches..." | logger -t "privacy.sh"; } | |
library="/Users/USER/Library" | |
safari_root="${library}/Safari" | |
sleep 5 | |
rm -rf ${safari_root}/{{Downloads,History,TopSites,LastSession}.plist,HistoryIndex.sk,WebpageIcons.db} ${library}/{Cookies,Caches/com.apple.Safari}/* | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment