[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2040
  • Last Modified:

word too long

i use linux 64 bit for certain job
my problem is that this job crash
it displays "word too long"
i think it is due to PATH value or LD_LIBRARY_PATH

so could u help me who resolve it
and if it is possible to set the path to a minimum value
which value should  i set

thank u for ur help
1 Solution
I'd bet it's probably the PATH that's too long.  This is probably happening because you log in scripts keep appending another whole listing of your PATH to the end of PATH.  What I would do is find out what your PATH needs to be and set it without appending it to the current PATH.

export PATH=$PATH:/some/more/stuff;

setenv PATH $PATH:/some/more/stuff  

adds /some/more/stuff onto the PATH even if it's not needed,

So by doing this
export PATH=/bin:/usr/bin:/usr/local/bin:/some/more/stuff

setenv PATH /bin:/usr/bin:/usr/local/bin:/some/more/stuff
You can define exactly what's in PATH,  of course you can do it with a bunch of IF statements everytime you add something to PATH.  Just be aware that putting stuff in the system wide files (/etc/profile or /etc/cshrc or whatever your system uses) they won't show up.
> it displays "word too long"
this error message is most likely from a command line in a shell
check your shell script you run for commands with a huge command line
if it is a sh script, then you may start it like:

  sh -x -e /path/to/your/script
Why deletion when there are valid answers to the question?
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

The reason I went with deletion was although valid answers were posted, it was still too wide open as to what the solution really was because the problem is still pretty vague.  It was just not obvious enough to me to accept either/both answers as solutions.  

If you do feel that your solution is the correct one, please state why.  Past experience with an identical/similar problem is the best proof though.  Then the moderator will take that into consideration and make their own judgement.
I have had the same situation before it happens when an enviornment variable's value is too long.  The author was on the right track and narrowed it down to PATH and LD_LIBRARY_PATH, but he wasn't sure how to shorten the values.  

I'd suggest a PAQ with 0 points and no refund, but a split is also fair
PAQed with no points refunded (of 50)

Community Support Moderator

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now