• Register
    • Login
    • Search
    • Categories
    • Recent
    1. Home
    2. swip
    3. Best
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 1
    • Controversial 0
    • Groups 0

    Best posts made by swip

    • RE: ClearSafariCache.sh Stuck

      The clearSafariCache.sh script takes a very long time (almost three minutes) on my machines, too, so I went ahead and optimized the find expression a bit so it won't unnecessarily descend into huge directories like com.apple.metadata.mdworker.

      Just replace the line

      find /private/var/folders \! -name "*SafariTechnologyPreview*" -name "*com.apple.Safari*" -exec rm -r {} \; 2>/dev/null
      

      with

      exec 2>/dev/null
      find /private/var/folders -name "*SafariTechnologyPreview*" -prune -o -name "com.apple.Safari*" -print0 -o -name "com.apple.*" -prune | xargs -0 rm -r
      

      Now the script finishes in less than a second.

      (I know that Cookie 6 and later do no longer use this script at all, but people who are still on older systems and cling to Cookie 5 might benefit.)

      posted in Cookie 5
      S
      swip