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


Click here to return to the 'Shell Script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Shell Script
Authored by: TigerKR on Jan 11, '03 12:32:22AM

Here's a double clickable shell script for that:

open up a terminal window and type:

cd ~/Desktop/
pico ClearCaches.command

then within pico type:

#!/bin/tcsh
cd ~/Library/Caches
sudo rm -rf *
cd /Library/Caches
sudo rm -rf *
cd /System/Library/Caches
sudo rm -rf *
sudo rm /System/Library/Extensions.kextcache
echo "All Caches Have Been Cleared!"
echo ""


to exit pico type these keys:

'control-x'
then 'y'
then 'return'

now in the terminal, type:

cd ~/Desktop/
chmod +x ClearCaches.command

Now you can double click on "ClearCaches.command" and it'll open up a terminal window. Then you enter your admin password, and the script does the rest. Do not be alarmed if you get:

sudo: No match.

or

rm: /System/Library/Extensions.kextcache: No such file or directory


That just means that there's nothing to delete.

You can put this file anywhere you like, and you can drag this into your login items control pane and run this at login if you like.

Please be careful with sudo and rm and -rf and *.

sudo == superuser do
rm == remove
-rf == no warnings and delete folders and their contents
* == everything in this local directory

Please don't get mad at me if something goes wrong.



[ Reply to This | # ]