starkk92 starkk92 - 1 year ago 102
Linux Question

How to set path for local bin file in cshrc

I use

and I have made a binary file
and the path is

[srinadel@slc ~/bin]$ ls -ltr
total 259
-rwxr-xr-x+ 1 srinadel dba 221806 Oct 21 03:48 rlwrap

Now I want to
set the path
for it in my
I have added this line in my

setenv PATH {$PATH}:/home/srinadel/bin/rlwrap

and I have
added alias in my /etc/csh.cshrc file

alias sqlplus 'rlwrap sqlplus'

And in the new terminal,I have seen the alias where I have found
sqlplus rlwrap sqlplus
I have tried to run sqlplus going all the way to my folder where
is located and run the
rlwrap sqlplus
and it worked fine.

Now I have tried to run
using alias,It didn't work.It says
command:rlwrap is not found

Now I have to some other folder and tried to run using
rlwrap sqlplus
just to see if the alias is at faulty,Even this didn't work.The same error was thrown-
command:rlwrap is not found

So I think there should be a problem with the path of the rlwrap.So I have run
echo $PATH
The output is as follows:

/ade/srinadel_collation_ts/oss/utl:/ade/srinadel_collation_ts/oss/bin:/opt/microfocus/cobol/bin:/usr/local/redhat/packages/perl_5.6.1/bin:/ade/srinadel_collation_ts/plsql/bin:/ ade/srinadel_collation_ts/plsql/utl:/ade/srinadel_collation_ts/plsql/utl/scripts:.:/ade/srinadel_collation_ts/buildtools/bin:/ade/b/2332830812/oracle/bin:/ade/b/2332830812/oracle/rdbms/utl:/ade/b/2332830812/oracle/rdbms/utl:/ade/srinadel_collation_ts/utl:/ade/srinadel_collation_ts/nlsrtl3/bin:/usr/sbin:/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/ generic/bin:/usr/local/bin:/etc:/usr/bin:/usr/ccs/bin:/usr/local/nde/bin:/usr/ucb:/usr/X11R6/bin:/usr/local/ade/bin:/ade/srinadel_collation_ts/odbctests/odbc_ptest/bin:/ade/ srinadel_collation_ts/rdbms_topaz:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/ usr/X11R6/bin:/usr/local/ade/bin:/home/srinadel/bin/rlwrap:/home/srinadel/bin/rlwrap:/ade/srinadel_collation_ts/utl:/ade/srinadel_collation_ts/reliaty/utl:/ade/srinadel_collation_ts/ant/bin:/home/srinadel/bin/rlwrap

Where the path to the
is shown correctly.

What might be the problem..Thanks.

Answer Source

The PATH variable is a list of directories to be searched, you need

setenv PATH {$PATH}:/home/srinadel/bin


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download