Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Cached 'favicons' in Safari can cause slowdowns' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Cached 'favicons' in Safari can cause slowdowns
Authored by: sailorman on Mar 29, '04 07:18:05PM

I tried adding this routine to Macaroni as one of its jobs and Macaroni did not like it....When I ran it with the terminal I had the same result as macfeller, ie. Icon folder size stays the same. Surely I am overlooking something.



[ Reply to This | # ]
Cached 'favicons' in Safari can cause slowdowns
Authored by: macfeller on Mar 29, '04 09:08:32PM

Could this be a Jag vs. Panther thang? Different shells?



[ Reply to This | # ]
Cached 'favicons' in Safari can cause slowdowns
Authored by: Duaiwe on Mar 29, '04 09:08:39PM
the command works fine, and you don't need administrator access to use it. (It only access your own Library folder). The command Nugget listed does not generate any feedback if it works properly. It will just bring you right back to the prompt.

The command ces3001 listed will print out every file that it deletes. But, if it doesn't delete anything, it won't print anything out, and just drop you right back to the prompt.

The key here, is that the command only deletes icons that havn't been accessed in the last 30 days. So, if everything in that folder has been accessed in the last 30 days, the command won't delete anything, and the folder size will stay the same. If you just want it to delete everything, then drop the -atime +30 bit:

find $HOME/Library/Safari/Icons -type f -name "*.cache" -delete

---
To know recursion, you must first know recursion.

[ Reply to This | # ]

Cached 'favicons' in Safari can cause slowdowns
Authored by: bluehz on Mar 30, '04 08:02:41AM

Just doing a few tests - modified a cache file at $HOME/Library/Safari/Icons/15/15 to show a created/modified date of 12/25/2003. Then ran..

find $HOME/Library/Safari/Icons -type f -atime +30 -name "*.cache" -delete ... e.g.:

$HOME/Library/Safari/Icons/15/15/
-rw-r--r-- 1 XXXX XXXX 107 Dec 25 12:25 3107740148-3612648702.cache

It did not find or delete the file that was obviously over 30 days old. Apparently this find command will not recurse into dir, so the actual root "$HOME/Library/Safari/Icons/15" would have to show a modified/created date in the last 30 days.



[ Reply to This | # ]
Cached 'favicons' in Safari can cause slowdowns
Authored by: Duaiwe on Mar 30, '04 08:36:05AM

I believe that the "-atime" switch checks the <b>access</b> time of the file, and not the modification or creation times. (At least, it seems that way according to find's man pages).

So, since you accessed the file in order to change its created/modified dates, it was likely accessed in the last 30 days, and not deleted.

---
To know recursion, you must first know recursion.



[ Reply to This | # ]
Cached 'favicons' in Safari can cause slowdowns
Authored by: msk on Mar 30, '04 10:08:54AM

the "-delete" on find will not work if you access the GNU version of find, which happened to me because I have /sw/bin/find in my Unix path before /usr/bin/find, because I installed "findutils" from fink (and removed now). (-exec rm {} \; is a possible replacement)

Also, find always descends into directories. The problem is that a lot of these cache files are getting accessed more recently, at least on my machine I had only two icon cache files not accessed in the last day.

I put:

find /Users/*/Library/Safari/Icons -type f -name "*.cache" -delete

in /etc/daily.local, that way those pesty icons will get cleaned once a day--I'll move it to a different script (weekly or monthly) once I see that I got it right. You have to create that script, read the scripts in /etc/periodic to get more ideas.



[ Reply to This | # ]