[X Newbies] Maintenance was Re: Problems Installing Apps

Christiaan Knol christiaan at iinet.net.au
Thu Apr 1 22:41:16 PST 2004

To delete the Icon files (hint credit from macosxhints.com) type the 
following in the terminal:

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

This deletes all icons not accessed within 30 days.  Change 30 to 
anything else you like.  Remove -delete from the end to see what it 
will delete, or add -print just before the -delete to see what it is 

I have the following script run as part of my maintenance scripts 
(within Macaroni) which outputs the results to a log file (clears out 
caches and icons).  Create a file such as maintenance.sh - I use 
Documents/Scripts to store these and insert whatever commands you wish 
to use in this file.  I have included mine below as an example.  In the 
terminal, issue the following command to make it executable:

chmod 755 /Users/your_username/Documents/scripts/maintenance.sh

Then within Macaroni create a new job and include the path to the 
script file you just created - I also have a log file in that same 
directory called maintenance.log  Macaroni will create this for you if 
there's not one there.  As an example, I have included my 
maintenance.sh script below which I have set to run once a week:


# echo start message
echo "Cache Clean Script Processing"

sudo rm -r /Users/your_username/Library/Caches/*
sudo rm -r /Library/Caches/*
sudo rm -r /System/Library/Caches/*

echo "Cache Cleared"

echo "Deleting unused Safari Icons"

find /Users/your_username/Library/Safari/Icons -type f -atime +7 -name 
"*.cache" -delete

echo "Icons Cleared"

Hope this is of some use...


On 02/04/2004, at 3:25 PM, birgit rhoads wrote:

> Randy, I used and like OnyX and still have it installed.  The thing I 
> like better about Macaroni is that is does it's work automatically and 
> I could not figure out how to do that with OnyX.
> I would like to have a script for Macaroni to tell it to trash the 
> Safari Icon folder on a regular basis.  Anyone have a script for this? 
>  I need a name for the log file too.  All this is kind of over my 
> head.
> Birgit

More information about the X-Newbies mailing list