{"id":419,"date":"2012-05-23T15:10:08","date_gmt":"2012-05-23T20:10:08","guid":{"rendered":"http:\/\/sites.williams.edu\/lj1\/?p=419"},"modified":"2014-12-16T14:03:49","modified_gmt":"2014-12-16T19:03:49","slug":"mac-command-to-remove-large-old-files","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/lj1\/labs\/mac-command-to-remove-large-old-files\/","title":{"rendered":"Mac &#8211; Command to remove Users &#8220;Large&#8221; and &#8220;Old&#8221; files"},"content":{"rendered":"<p>This command finds all files larger than 10 MB AND which haven&#8217;t been accessed in over 4 weeks:<br \/>\n<code>sudo find \/Users -size +10M -atime +4w<br \/>\n<\/code><\/p>\n<p>This finds the same and removes them (there is no undo!):<br \/>\n<code>sudo find \/Users -size +10M -atime +4w -exec rm {} \\;<\/code><\/p>\n<p>There appear to be large cache files being created in the Fall of 2014 &#8230;. this command removes them:<br \/>\n<code>sudo find \/Users -size +100M -name lsm_map -atime +2w -exec rm {} \\;<\/code><\/p>\n<p>When booting to external drive, this finds files 100 MBs large and 4 weeks old and lists them with &#8220;ls -lah&#8221;:<br \/>\n<code>sudo find \"\/Volumes\/Macintosh HD\/Users\" -size +100M -atime +4w -exec ls -lah {} \\;<\/code><\/p>\n<p>Lists the total size of a directory structure:<br \/>\n<code>sudo du -sh \/Users\/xxx<\/code><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This command finds all files larger than 10 MB AND which haven&#8217;t been accessed in over 4 weeks: sudo find \/Users -size +10M -atime +4w This finds the same and removes them (there is no undo!): sudo find \/Users -size &hellip; <a class=\"more-link\" href=\"https:\/\/sites.williams.edu\/lj1\/labs\/mac-command-to-remove-large-old-files\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10086],"tags":[10090],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-labs","tag-mac"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":11,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":421,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/419\/revisions\/421"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}