I have a trick for you. In your .cshrc file, instead of adding each
directory to your path in the foreach statements, do this:

set tpath=$path

foreach....

        set tpath=($tpath $i)
...

set path=$tpath

The reason for this is that the csh dumps its execname cache on
each assignment to $path and then re-reads all of the directories
in the new path to rebuild the cache. Thus each directory in your
path gets read and re-read again and again, when once is enough.

I discovered this when I started wondering why it took so long to
login.

Darren Reed wrote:
> Kyle McDonald wrote:
> 
>> Joseph Kowalski wrote:
>>
>>> We want to start putting all user utilities with non-conflicting 
>>> names into /usr/bin.
>>
>> Why? Please NO!
>>
>> I know I'm just a lowly long time user of Solaris, but please don't 
>> polute /usr/bin with this stuff.
>>
>> I've always hated the linux approach of throwing everything in one 
>> place. What was it another post said 4000+ programins in /usr/bin? 
>> Yuck! I found the includion of GNOME in /usr/bin to be a mistake, and 
>> I think others who orignally thought is was ok now think so too.
> 
> 
> Over the last...10+ years, my .cshrc file has travelled with me
> from job to job, platform to platform and generally just grows
> as it needs to find exes in each place...this is what it currently is:
> 
> foreach i ( ~/bin{,/$arch.$rev} /krb5/bin /opt/ansic/bin /bin \
>            /krb5/sbin /sbin /etc /usr/bin /usr/ccs/bin /bin /usr/dist/exe \
>            /usr/local/sbin 
> /opt/{hpnp,local,gnu,sfw,CTEact,SUNWspro,jdk}/bin \
>            /opt/SUNWspro/SOS8/bin )
>        if ( -d $i ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
> end
> foreach i ( 
> /usr/{sbin,proc/bin,bsd,ucb,local}/{sbin,rcs,bin/{,nn,mh},etc}} )
>        if ( -d $i ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
> end
> foreach i ( /usr/{pkg,sfw,proc}/bin 
> /usr/{X11{,R5,R6}/bin,etc,XFree86/bin} \
>            /usr/bin/X11 /usr/contrib/bin/X11 /usr/{games,hosts,acad/acad} )
>        if ( -d "$i" ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
> end
> 
> foreach i ( /krb5/admin /users/public/{scripts,acad_train} \
>            /usr/openwin/{bin,demo} )
>        if ( -d $i ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
> end
> foreach i ( /usr/cpu/sysgen/root/usr/{sbin,bin} /usr/contrib/Q4/bin \
>            /opt/{FOREatm,tusc,ipf,java,optimation}/bin \
>            /opt/{imake,langtools}/bin )
>        if ( -d "$i" ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
>        endif
> end
> foreach i ( /usr/{freeware,contrib}/bin 
> /emul/sunos/usr/{openwin,local}/bin \
>            /usr/contrib/win32/bin /opt/onbld/bin )
>        if ( -d $i ) then
>                set path=($path $i)
>                if ($?prompt) echo -n "$i ";
>        endif
> end
> rehash
> if ($?prompt) echo "";
> 
> ...and that excludes things to find tools to build Solaris.
> 
> Now explain to me why we need to add another directory rather
> than just populate one directory more fully?
> 
> Darren
> 
> p.s. there are too many path components for one foreach().

-- 
blu

"Remember 'A Thousand Points of Light'? With a network, we now have
a thousand points of failure."
----------------------------------------------------------------------
Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom

Reply via email to