Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute command style

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
0
0
CA
Hello,
I have a question:
What is the different between executing a command at the true path or reference path which I see both directory having the command I want to use,
and executing a command with or without ./ ?
I am all confused and it costs me time to figure out how to run a command.
eg: ls -l /opt/VRTSvlic/bin (link from /sbin) or ls -l /sbin
I will see command "vxlicinst"

I can not execute it as vxlicinst
at either /sbin nor /opt/VRTSvlic/bin directories
but I have to execute it as /opt/VRTSvlic/bin# ./vxlicinst

Thanks
 
This is due to the directory of the executable not in your profile path.

Add the following to your path:

PATH=$PATH:/opt/VRTSvlic/bin:
export PATH

Then you will be able to run the command without the ./
 
Using ./ or not depends on the shell you are using.
For example sh requires the ./, csh or tcsh does not.
This is obviouslyt when you are located in the directory where the executable resides. Else the pprevious reply applies.

Too bad I.T. is not cash business

Luc Foata
Unix sysadmin, Oracle DBA
 
I affirm: it is not shell dependant, it is the userenv; by default csh and tcsh PATH for root does not contain "."

Regards
-- Franz
Sorry I'm not a native spaeker, I'm from Munich, Germany - "Home of the Whopper", oh no, "Home of the Oktoberfest" ;-)
Solaris System Manager; I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thanks all,
I agree that the problem is the path does not include "." for root that causes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top