Created
April 12, 2009 14:06
-
-
Save robc/94009 to your computer and use it in GitHub Desktop.
A quick Ruby Script to clear out Safari 4's Website Previews from disk
This file contains 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
# Cleans out Safari 4's website previews - these can rapidly consume a large amount of disk space :/ | |
path = "/private/var/folders/so/soew68z1HjWMADz0uUh4GE+++TI/-Caches-/com.apple.Safari/Webpage Previews" | |
Dir.foreach(path) do |entry| | |
file_path = "#{path}/#{entry}" | |
File.delete(file_path) unless File.directory?(file_path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment