Library\/Application Support\/Google\/DriveFS<\/code> using the default shell provided by macOS.<\/p>\n\n\n\nYou can check the TL;DR<\/strong> above or follow along and do the steps yourself to achieve the same result.<\/p>\n\n\n\nWe’re going to use a basic find<\/code> command within a shell script<\/code> that is run via an Apple Automator<\/strong> application every time the user logs in. Alternatively, one could also use plist files for launch demons at login.<\/em><\/p>\n\n\n\nLet’s get started!<\/p>\n\n\n\n
Creating the Apple Automator script<\/h4>\n\n\n\n- start the Automator<\/strong> app either via Launchpad<\/em>, Spotlight<\/em> or Finder > Applications<\/em><\/li>
- once it has started, select Application<\/strong> and click Choose<\/strong><\/li>
- in the top-left corner click on Library<\/strong> (if it is not already visible<\/li>
- select “Library”<\/strong> at the top of the tree list<\/li>
- search for “Run Shell Script<\/strong>” and add it via double-clicking<\/strong> on it<\/li>
- for Shell<\/strong> select \/bin\/sh<\/strong><\/li>
- put the following into the text field:
find ~\/Library\/Application\\ Support\/Google\/DriveFS -type d -exec test -e '{}'\/content_cache \\; -exec rm -rf {}\/content_cache \\;<\/code><\/li>- click on File > Save…<\/li>
- set the File Format<\/strong> to Application<\/strong><\/li>
- save it to your Home folder or iCloud Drive with a descriptive name, like “Clear Google File Stream Cache<\/strong>“<\/li><\/ol>\n\n\n\n
Adding the cache cleaning script to the Login Items<\/h4>\n\n\n\n- open System Preferences<\/strong> > Users & Groups<\/strong><\/li>
- select your user on the left<\/li>
- switch to the Login Items<\/strong> tab on the right<\/li>
- click the “+” at the bottom of the list<\/li>
- select the Clear Google File Stream Cache<\/strong> script you’ve just saved<\/li>
- Done!<\/li><\/ol>\n\n\n\n
Now the Google Drive File Stream cache is cleared by removing the content_cache<\/code> directory every time during the user’s login.<\/p>\n","protected":false},"excerpt":{"rendered":"I’m in a hurry! TL;DR? Download and unzip this Automator script to your Home dir (or iCloud Drive) open System Preferences > Users & Groups select your user on the left switch to Login Items on the right click the “+” at the bottom of the list select the Clear Google File Stream Cache script […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[34,17],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":10,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}