Archive

Posts Tagged ‘clean’

OS X System Optimization Script

June 3rd, 2005

The script below combines the functions of several others on this
site into one “optimization” script.  It cleans up the
various caches, updates prebindings to improve system performance,
repairs permissions on the startup disk, and reboots the
computer.

It must be run with administrator privileges in order to
work properly.

As with all my scripts, this one is offered
“as is” without warranty or support.  If you choose to
use it, you accept all liability and responsibility for whatever might
happen to your system (good or bad).

Read more…

admin Mac Support , , , , , , , , , , , , , , , ,

OS X Script to Flush lookupd Cache

June 3rd, 2005

The lookupd process is a component of Mac OS X which allows programs
running on the system to request information about other users and
computers on the network.  This process uses an in-memory cache to
store information about recent activity.  This cache can become
outdated, inaccurate, or incomplete as a result of changes on the
network, or through bugs in lookupd.  To correct some kinds of
network problems, it is helpful for troubleshooting purposes to clear
out or “flush” the lookupd cache.

The script below
attempts to flush the lookupd cache, then kill the relevant
processes.  Those processes will be automatically restarted by OS X
after they’re killed.

As with all my scripts, while I’ve tested
this on a number of Mac OS X 10.3.x systems and it appears to work as
designed, I provide it “as is” without warranty or
support.  If you choose to use it, you assume all responsibility
and liability for whatever happens (good or bad).

This script can
be run from the command line or a cron task.

Read more…

admin Mac Support , , , , , , , , , , , , , ,

OS X System Cache Cleaning Script

June 3rd, 2005

As part of its normal operation, OS X creates a number of cache files
that allow it to speed up its operations.  Like any files, these
cache files can become corrupted, fragmented, or otherwise
damaged.  This can cause the system to slow down, crash, or behave
erratically.

To prevent such problems, I developed the following
script to delete the system cache files on the computer each night and
force a reboot to maintain the system’s integrity (since deleting a
cache file the OS is using would be “a bad
thing”).

While I’ve tested this script on Mac OS X 10.3.x and
10.4 and believe that it functions as designed, I can’t promise that it
will work on earlier or later OS X releases and provide no warranty or
support.  As with all my scripts, this one is provided “as
is”.  If you are able to make use of it and derive value from
it, great!  If not, you assume all responsibility and liability for
what happens to your system if you choose to use or modify this
script.

This script can be executed from the command line or via a
cron task.

Read more…

admin Mac Support , , , , , , , , , , , ,

OS X Local Cache Cleaning Script

June 3rd, 2005

As you use your Macintosh, OS X creates a number of cache files in
your home directory under “/Users”.  These cache files
are intended to speed up or otherwise improve system performance. 
However, like any files, they can become damaged or corrupted. 
When this happens, the system will behave erratically and perhaps crash
or lock up.

The script below will automatically delete all the
cache files for all the users on the system and attempt to force the
system to reboot (so that the now-missing cache files don’t cause a
crash).

While I’ve tested this script on several OS X 10.3.x and
10.4 systems and have not suffered any problems as a result of using it,
I provide it “as is” and without any warranty of any
kind.  If you use it and it works well for you, great!  If it
doesn’t work or it causes you any kind of problem or loss, you agree
that you assumed that responsibility and liability when you tried to use
the script.

This script can be run from the command line or as a
cron task.

Read more…

admin Mac Support , , , , , , , , , , , ,

OS X Font Cache Cleaning Script

June 3rd, 2005

As part of its normal operation, Mac OS X creates “font
cache” files that help it to speed up the display of fonts on the
screen.  Unfortunately, as with many types of cache files, OS X
font cache files can become corrupted or damaged.  When this
happens, strange font display problems, application crashes, or system
crashes may occur.  It’s a good idea to periodically delete the
font cache files, which OS X will dutifully rebuild on the next reboot
with clean non-corrupted copies.

Font cache files are stored in
“/System/Library/Caches” in a variety of files with different
names.  Those names all follow specific patterns, so we can easily
build a script to look for files with those names and delete them
automatically.

This script has been tested and to the best of my
knowledge appears to work on OS X 10.3.x and 10.4.  It may or may
not work with earlier or later versions of OS X.  As with all my
scripts, I provide it “as is” without warranty or support of
any kind.  If you choose to try this script, you accept all
responsibility for any damage it does to your computer or
data.

This script can be executed from the command line or a cron
task.

Read more…

admin Mac Support , , , , , , , , , , , , , , , , , , , , , , ,

OS X Internet Cache Cleaning Script

June 3rd, 2005

As you use your Macintosh to browse the web, your web browser begins
storing “cache” files on your computer’s hard disk drive in
order to make browsing faster.  For example, if you were looking at
Ford’s web site, trying to decide what new car to buy, your browser
might cache a copy of the Ford logo on your Mac.  Each time you
look at a new page, instead of asking Ford’s web server for another copy
of the Ford logo, your Mac uses the file in its cache (which it can read
much faster than it can get a new copy from Ford’s server).  This
is generally a good thing.

But like any other cache files, these
Internet cache files can become corrupted.  When this happens, the
web browser may crash, behave strangely, or even refuse to run at
all.  In an attempt to prevent this problem, I took some time to
try to determine where the different Mac web browsers we use store their
cache files.  Then I wrote the script below to automatically clear
out those caches each night.

As with all my scripts, this one was
tested with OS X 10.3.x and 10.4 and the web browsers and versions
we use at my place of employment.  While I believe that this script
works as intended and that it won’t wipe out your hard drive or cause
you some other problem, I can’t warranty that.  If you choose to
use this script on your Macintosh, you assume all liability and
responsibility for what happens to your computer as a result.  If
the script works for you, great!  If not, I’m sorry and I hope you
didn’t lose anything important – but there’s nothing I can do for
you.

This script can be executed from the command line or a cron
task.

Read more…

admin Mac Support , , , , , , , , , , , , ,