• Categories
  • Recent
Collapse
S

swip

@swip
About
Posts
1
Topics
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    ClearSafariCache.sh Stuck
  • S swip

    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.)

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Login

  • Don't have an account? Register

  • Login or register to search.