Re: PATH Variable settings (142 Views)
Reply
Regular Advisor
Narendra Uttekar
Posts: 230
Registered: ‎12-30-2007
Message 1 of 18 (142 Views)
Accepted Solution

PATH Variable settings

Hi,
When i want to check the exported enviromental settings i need to give /usr/bin/env , /usr/bin/pwd. But it won't display anything when used env or pwd. But when i check the /usr/bin is in PATH vaibale still why it doesn't work?

PATH=/oracle/TCQ/102_64/bin:.:/home/tcqadm:/usr/sap/TCQ/SYS/exe/run:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/resmon/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/pd/bin:/opt/gnome/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/usr/sbin/diag/contrib:/opt/ignite/bin:/opt/hpsmh/bin:/opt/perl/bin:/opt/ssh/bin:/opt/java1.4/jre/bin:/opt/spb/bin:/opt/gwlm/bin:/opt/omni/bin:/opt/hpnpl//bin:/sbin/fs/vxfs3.5/bin

Thanks,
Narendra
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,132
Registered: ‎10-02-2001
Message 2 of 18 (142 Views)

Re: PATH Variable settings

If you need /usr/bin/env in PATH, you must configure it.

Just /usr/bin/ isn't enough.

If this would be enough, PATH have to be set to "/" only, but this doesn't work ...

;-))

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
HP Pro
SoorajCleris
Posts: 886
Registered: ‎12-19-2008
Message 3 of 18 (142 Views)

Re: PATH Variable settings

Hi Narendra,

Is this same for users?

Try whereis command .

Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 4 of 18 (142 Views)

Re: PATH Variable settings

Hi,

is this from user env? 'env|grep PATH' ?
Strange - looks ok.

@Thorsten - /usr/bin should work to find the commands /usr/bin/env and /usr/bin/pwd ...

Narendra, check with 'which env' and 'whereis env'.

But I would not place /oracle, . and /usr/sap at front of your PATH - there should be the os bin-directories /usr/sbin:/usr/bin.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Please use plain text.
Honored Contributor
Peter Nikitka
Posts: 1,575
Registered: ‎02-10-2003
Message 5 of 18 (142 Views)

Re: PATH Variable settings

Hi,

which shell do you use?
For Bourne-like shells check the results of the builtin commands
export

For CSH-like shells try
setenv

Do you get results (don't supply a parameter to any of the commands)?

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,769
Registered: ‎03-06-2006
Message 6 of 18 (142 Views)

Re: PATH Variable settings

What do these show?
echo $SHELL
whence -v env
whence -v pwd

But you should be able to use the real shell's builtin pwd.
Please use plain text.
Regular Advisor
Jitesh purohit_1
Posts: 74
Registered: ‎02-10-2009
Message 7 of 18 (142 Views)

Re: PATH Variable settings

Hi Narendra ,

what is the userid from you are loggin in server, And did you checked the shell for the user

Thanks
Jitesh
Please use plain text.
Honored Contributor
sujit kumar singh
Posts: 1,228
Registered: ‎09-16-2006
Message 8 of 18 (142 Views)

Re: PATH Variable settings

hi


Just wanted to know,

PATH=/oracle/TCQ/102_64/bin:.:/home/tcqadm


is that . between : and : intentionally placesd, what is the purpose of that?
regards
sujit
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,132
Registered: ‎10-02-2001
Message 9 of 18 (142 Views)

Re: PATH Variable settings

Ooops, I was thinking about pathes and directories ... but these commands are shell built-ins.

What shell are you using?

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,132
Registered: ‎10-02-2001
Message 10 of 18 (142 Views)

Re: PATH Variable settings

Try:

#whereis pwd
pwd: /usr/bin/pwd /usr/share/man/man1.Z/pwd.1
#type pwd
pwd is a shell builtin
#whence pwd
pwd

#whereis env
env: /usr/bin/env /usr/share/man/man1.Z/env.1
#type env
env is /usr/bin/env
#whence env
/usr/bin/env

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 11 of 18 (142 Views)

Re: PATH Variable settings

@sujit - '.' is the current directory, so shell searches there too.

V.
*** Say 'Thanks' with Kudos ***
Please use plain text.
Regular Advisor
Narendra Uttekar
Posts: 230
Registered: ‎12-30-2007
Message 12 of 18 (142 Views)

Re: PATH Variable settings

Hi,
I am using csh shell. It is working fine with other user on same system, but not working with this it works but with absolute path /usr/bin/env...but when i echo $PATH it is showing that /usr/bin is set , so it should work with env or pwd...not needed to give absoulte path i.e. /usr/bin/env as it is working with other user.

Thanks,
Narendra
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,132
Registered: ‎10-02-2001
Message 13 of 18 (142 Views)

Re: PATH Variable settings

Try the commands above to see if there are aliases or something.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Honored Contributor
Aneesh Mohan
Posts: 804
Registered: ‎07-02-2007
Message 14 of 18 (142 Views)

Re: PATH Variable settings

Hi ,

Please post

# what `which env`;echo $0


Aneesh
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 15 of 18 (142 Views)

Re: PATH Variable settings

Hi again,

check if 'echo $PATH' is identical for the other users, also check .cshrc
Make a 'diff '.

Also check for aliasse.

After login - 'pwd' is the users home dir?

V.
*** Say 'Thanks' with Kudos ***
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,769
Registered: ‎03-06-2006
Message 16 of 18 (142 Views)

Re: PATH Variable settings

>I am using csh shell.

(You shouldn't be using the scummy C shell.)
The scummy C shell uses $path and not $PATH for its lookup. Are they the same?
Please use plain text.
Regular Advisor
Narendra Uttekar
Posts: 230
Registered: ‎12-30-2007
Message 17 of 18 (142 Views)

Re: PATH Variable settings

I have found the solution.
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 18 of 18 (142 Views)

Re: PATH Variable settings

Well - it would have been nice to tell us and others who maybe have the same problem later your solution!
*** Say 'Thanks' with Kudos ***
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation