Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: clearing Netscape's cache




On Sat, Oct 25, 1997 at 10:57:03PM +0900, Jim Schweizer wrote:


> I got an interesting csh tip about how to clear Netscape's cache on logout but
> couldn't get it to work for me. 


How about just configuring netscape's disk cache to be like 1MB in its
Network Config panel?

> schweiz:~/bin$ cat rmcache 


How about something like

    #! /bin/sh
    
    netscapes=`ps -aux | grep netscape | grep -v grep | grep $USER`
    
    exit=0
    
    if echo $netscapes | grep hdd/netscape/netscape
    then
      echo "Shut down netscape 3.0 first."
      exit=1
    fi
    if echo $netscapes | grep hdd/nav403/netscape
    then
      echo "Shut down netscape 4.03 first."
      exit=1
    fi
    if [ $exit -eq 1 ]
    then
       exit 1
    fi
    
    echo Clearning netscape cache...
    rm -rf $HOME/.netscape/cache/*
    rm -rf $HOME/.netscape/archive/*
    
    exit 0

(I haven't actually tried this, don't sue me if there's a typeo or
something :-)

I believe netscape writes a little file in $HOME/.netscape which has
the pid of the running process in it (so it can detect when you try to
run two netscapes at once).  Wouldn't it be a lot easier to just look
for the existance of that file, instead of hardcoding pathnames in
there?

Jason
Next TLUG meeting is Saturday Dec. 13, 1997  (possibly Nov. 13?)
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links