Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]tlug: clearing Netscape's cache
- To: tlug@example.com
- Subject: tlug: clearing Netscape's cache
- From: Jim Schweizer <schweiz@example.com>
- Date: Sat, 25 Oct 1997 22:57:03 +0900 (JST)
- Content-Transfer-Encoding: 8bit
- Content-Type: text/plain; charset=us-ascii
- Organization: JPS Solutions
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
Hi all, I got an interesting csh tip about how to clear Netscape's cache on logout but couldn't get it to work for me. So, I tried a bash solution which works, but isn't really there yet. Here's the original tip: ------------------- CUT HERE ------------------------------ #!/bin/csh if !( `ps -eu $USER | grep netscape | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` ) then echo echo "Clearing Netscape cache..." \rm -rf ~/.netscape/cache/* endif echo echo "Exiting..." ------------------- CUT HERE ------------------------------ as I said, it didn't work for me. I came up with: schweiz:~/bin$ cat rmcache ----Jim's hack------------------------------- #!/bin/sh if ps -aux | grep $USER/hdd/netscape/netscape then echo "Shut down netscape 3.0 first." elif ps -aux | grep $USER/hdd/nav403/netscape then echo "Shut down netscape 4.03 first." else echo echo "Clearing Netscape cache..." rm -rf ~/.netscape/cache/* rm -rf ~/.netscape/archive/* echo echo "running df" echo df echo fi -------end Jim's hack------------------------ The problems I'm having are: 1. I run multiple versions of netscape - 2.02, 3.0 and 4.03 and 2. caching is in ~/.netscape/cache and ~/.netscape/archive The above script works, but it's not elegant. How do I use ps to find out which versions of netscape are running (and by which user) without using a path? If I try: ps -aux | grep $USER*netscape it, of course, dies since ps returns *netscape and exits. I'm not worried about the logout part .... but, as always, I'm curious.... Jim S. 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
- Follow-Ups:
- Re: tlug: clearing Netscape's cache
- From: Jason Molenda <crash@example.com>
- Re: tlug: clearing Netscape's cache
- From: Felix Morley Finch <felix@example.com>
Home | Main Index | Thread Index
- Prev by Date: tlug: problems with jserver and mule
- Next by Date: Re: tlug: clearing Netscape's cache
- Prev by thread: RE: tlug: problems with jserver and mule
- Next by thread: Re: tlug: clearing Netscape's cache
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links