Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WARNING Ridiculously long path. . .

290 views
Skip to first unread message

Ian Hutchison

unread,
Oct 8, 1996, 3:00:00 AM10/8/96
to

TRUNCATED!

I don't know if this is a benign error message or not, but it is
very. . .annoying.

Warning: ridiculously long PATH truncated

I know that it is from the .cshrc file. I get this error four times
each time a new shell is created. I put in echos and figured out
which 'set path' commands were giving me the errors. I talked to
my sysadmin and he doesn't know. Thus, I am throwing this one to
The Group--

1. Is there a limit to the length of the PATH environment
variable???

2. Does truncated mean clipped?

3. What are the viable options to make it go away?

I am running Open Look Window Manager on my Sun SPARCstation4,
and the SunOS (4?).

Thanks for your help. Please drop me an e-mail, if possible.
There are many of us here who are getting this error.

*

***
A candidate is a person who gets money from the rich and votes from the
poor to protect them from each other.
***
--

***************************************
Ian Hutchison
hutc...@motsat.sat.mot.com
***************************************

Nir Soffer

unread,
Oct 9, 1996, 3:00:00 AM10/9/96
to

Ian Hutchison (hutc...@motsat.sat.mot.com) wrote:
: I know that it is from the .cshrc file. I get this error four times

: each time a new shell is created. I put in echos and figured out
: which 'set path' commands were giving me the errors. I talked to
: my sysadmin and he doesn't know. Thus, I am throwing this one to
: The Group--

: 1. Is there a limit to the length of the PATH environment
: variable???

Might be, I'm not sure about your case but perhaps you've forgotten some
kind of delimiter and have a 'run-away' string?

: 2. Does truncated mean clipped?

Yes.

: Thanks for your help. Please drop me an e-mail, if possible.

: There are many of us here who are getting this error.

Are they using the same default system .cshrc file? The problem may very
well be in the syntax.

: *

: ***
: A candidate is a person who gets money from the rich and votes from the
: poor to protect them from each other.
: ***
: --

: ***************************************
: Ian Hutchison
: hutc...@motsat.sat.mot.com
: ***************************************

--
--
Nir Soffer AKA ScorpioS. scor...@cs.huji.ac.il -=-
http://www.cs.huji.ac.il/~scorpios/
'Beavis! Fire photon torpedos! Uhhh... Make them go that way!'.


Tim Dietrich

unread,
Oct 9, 1996, 3:00:00 AM10/9/96
to Ian Hutchison

Ian Hutchison wrote:
>
> TRUNCATED!
>
> I don't know if this is a benign error message or not, but it is
> very. . .annoying.
>
> Warning: ridiculously long PATH truncated
>
> I know that it is from the .cshrc file. I get this error four times
> each time a new shell is created. I put in echos and figured out
> which 'set path' commands were giving me the errors. I talked to
> my sysadmin and he doesn't know. Thus, I am throwing this one to
> The Group--
>
> 1. Is there a limit to the length of the PATH environment
> variable???
>
> 2. Does truncated mean clipped?
>
> 3. What are the viable options to make it go away?
>
> I am running Open Look Window Manager on my Sun SPARCstation4,
> and the SunOS (4?).

I have encountered this error in the past on an HP platform. In our case
it was caused by the fact that the .cshrc and .login files were both
appending to the path and then were sourcing each other, resulting in
.cshrc->.login->.cshrc->.login and on and on and on. You can tell if
this is the source of your problem by doing an "echo $PATH" and then
looking for any repeating patterns/path names. You can probably also get
a rough estimate of the maximum allowable path length by piping the
results of this command through "wc".

Andreas Schulz

unread,
Oct 10, 1996, 3:00:00 AM10/10/96
to

>Ian Hutchison wrote:
>>
>> TRUNCATED!
>>
>> I don't know if this is a benign error message or not, but it is
>> very. . .annoying.
>>
>> Warning: ridiculously long PATH truncated
>>
>> I know that it is from the .cshrc file. I get this error four times
>> each time a new shell is created. I put in echos and figured out
>> which 'set path' commands were giving me the errors. I talked to
>> my sysadmin and he doesn't know. Thus, I am throwing this one to
>> The Group--

1. you may want to try csh -V resp. csh -X to find out where your
PATH gets too long.

2. we also occasionally had this problem in the old days. The reason
are usually too many statements like
setenv PATH ${PATH}:/foo/bar:/what/ever
especially effective when subsubsub..shells are started.

3. check out also whether the same file is SOURCEd several times
or recursive (as someone already pointed out)

4. we now always use constructions like (comes in different flavours
from different vendors, there are always at least four ways to Rome
in UNIX ;-)

if ( $PATH !~ *$HOME/bin/common* ) then
setenv PATH $PATH":"$HOME"/bin/:"$HOME"/bin/common"
endif

to avoid multiple insertions of the same directory into PATH

5. another idea would be something like
if ( $PATH !~ */something/inserted/below* ) then exit
when you know that you need nothing of the following lines in your
~/.cshrc for subshells. In general, aliases should be set before,
setenv's may be behind, since they are inherited by subshells.

--
Andreas...@erno.de DASA, Space Infrastructure, Bremen, Germany

Pat Malone

unread,
Oct 11, 1996, 3:00:00 AM10/11/96
to

In article <325B082A...@motsat.sat.mot.com>,

Ian Hutchison <hutc...@motsat.sat.mot.com> wrote:
>I don't know if this is a benign error message or not, but it is
>very. . .annoying.
>
> Warning: ridiculously long PATH truncated

I found this once. I thought it was hilarious. It comes from the ucb which
command. It finds a very long path, says 'forget it', ignores the end of
your path, and only works with as much as it can hold.

It is not truncating your environment variable.


--
Pat Malone - mal...@rmii.com
I used to live in a room full of mirrors, all I could see was me
Took my spirit and crashed my mirror, now the whole world's here for me to see
- J. Hendrix

Tim Haynes

unread,
Oct 15, 1996, 3:00:00 AM10/15/96
to

Ian Hutchison (hutc...@motsat.sat.mot.com) wrote:
: Warning: ridiculously long PATH truncated
: I know that it is from the .cshrc file. I get this error four times
: 1. Is there a limit to the length of the PATH environment

Probably. Watch this for style :)

richard 15:07:58 piglet > set path = ( $path $path )
richard 15:11:45 piglet > set path = ( $path $path )
richard 15:11:47 piglet > set path = ( $path $path )
richard 15:11:49 piglet > set path = ( $path $path )


Warning: ridiculously long PATH truncated

richard 15:11:58 piglet > echo $path | /usr/bin/wc
1 128 1488
richard 15:12:14 piglet >

I guess that means it won't go over about 1500 bytes or something.

: 2. Does truncated mean clipped?
Yes. It appears to have lost most of the essential stuff off the end.

: 3. What are the viable options to make it go away?
Don't do anything recursive in setting path = ( $path ) more than once.

Hope it works..

Tim

-----------------------------------------------------------------------------
Tim Haynes (td...@dcs.ed.ac.uk) "You can drive a man to suicide,
Undergraduate CS guy at Edinburgh but you can't make him think"
GCS d? p c++++ l= e* m* s--/+ !n h+ f+ !g w+ t--- r- y?

Albert W. Dorrington

unread,
Oct 15, 1996, 3:00:00 AM10/15/96
to

In article <DzBpnt.H5A.0.sta...@dcs.ed.ac.uk>, td...@tardis.ed.ac.uk (Tim Haynes) writes:
|> Ian Hutchison (hutc...@motsat.sat.mot.com) wrote:
|> : Warning: ridiculously long PATH truncated
|> : I know that it is from the .cshrc file. I get this error four times
|> : 1. Is there a limit to the length of the PATH environment
|>
|> Probably. Watch this for style :)
|>
|> richard 15:07:58 piglet > set path = ( $path $path )
|> richard 15:11:45 piglet > set path = ( $path $path )
|> richard 15:11:47 piglet > set path = ( $path $path )
|> richard 15:11:49 piglet > set path = ( $path $path )
|> Warning: ridiculously long PATH truncated
|> richard 15:11:58 piglet > echo $path | /usr/bin/wc
|> 1 128 1488
|> richard 15:12:14 piglet >
|>
|> I guess that means it won't go over about 1500 bytes or something.
|>
|> : 2. Does truncated mean clipped?
|> Yes. It appears to have lost most of the essential stuff off the end.
|>
|> : 3. What are the viable options to make it go away?
|> Don't do anything recursive in setting path = ( $path ) more than once.
|>
|> Hope it works..
|>

Another thing to keep in mind, is if you ever use the 'which'
command, it actually resources your .cshrc file. So, in order
to keep your path variable from growing, make sure your do not
do a: set path = ( $path {additional path info here ) the first time
in your .cshrc file.
Instead make it something like: set path = ( /bin /usr/bin )

- Al

--
Al Dorrington
awdo...@ictest.delcoelect.com Database Admin
Delco Electronics - IC CIM Unix Sysadmin
Kokomo, Indiana, USA Phone: 317.451.9655

Vaughan Marks

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to

In article <540jj5$o...@kocrsv08.delcoelect.com> awdo...@ictest.delcoelect.com (Albert W. Dorrington) writes:
>
> Another thing to keep in mind, is if you ever use the 'which'
> command, it actually resources your .cshrc file. So, in order
> to keep your path variable from growing, make sure your do not
> do a: set path = ( $path {additional path info here ) the first time
> in your .cshrc file.
> Instead make it something like: set path = ( /bin /usr/bin )

Thats ridiculous. Much better is to make your .cshrc protect
itself from being sourced multiple times. For example you can use
some construct such as:

if ($?USER == 0 || $?prompt == 0) exit

The precise test may vary depending on the shell that you use.
The basic idea, though, is to take some condition that is true
only _after_ the shell loads its environment. Then apply the test
right at the beginning of your environment file. If your
environment is already setup, get the hell out of there ASAP ;-)
--
Cheers,
vaughan

Channa Rao

unread,
Oct 18, 1996, 3:00:00 AM10/18/96
to

Tim Haynes wrote:
>
> Ian Hutchison (hutc...@motsat.sat.mot.com) wrote:
> : Warning: ridiculously long PATH truncated
> : I know that it is from the .cshrc file. I get this error four times
> : 1. Is there a limit to the length of the PATH environment

It is usually a KERNEL parameter, in SVR4 the ARG_MAX defines the maximum
length in bytes of an srgument string that can be passed.

Check with your KERNEL and good luck.

Ravi

0 new messages