[csw-users] about the path name

Binod binod3 at gmail.com
Wed Oct 3 18:36:19 CEST 2007


Thanks George for your thoughts on this.

When I did which for "svn" it just pointed towards /opt/csw/bin/svn and
didn't show any other path related to svn.

I also tried find / -name "svn" and even in this case it just lead me to the
/opt/csw/bin/svn

With all this in hand, I assumed that when I type svn, it should
automatically read from /opt/csw/bin/svn, which does not seem to be the
case.

I am guessing , when svn was uninstalled from the box from the location
/usr/local/bin the package might have left some mark somewhere and
therefore, when I type svn it is still trying to read from there.

Currently my path starts from /opt/csw/bin. But I wanted it in the end of my
path just because I wanted it to work no matter where I put this in my path,
thats all.

Thanks for all your help.



On 10/3/07, George Wyche <gw at citasystems.com> wrote:
>
> Adjusting the path and overriding it with soft links (the ln -s command)
> is an art. There are some strong opinions about that art. Some of the
> opinions are backed with decent explanations, but most are either just
> stated, or are too old to take into account newer security concerns, or
> are assuming a situation that does not apply to you, or don't account
> for user lack of resolve to "adhere to policy".
>
> The fact of the matter is this: You can put /opt/csw/bin at the end of
> your path and then place soft links to any (or all) of the commands in
> /usr/local/bin which is much closer to the front of your path. When your
> shell searches for "svn" it will find it in /usr/local/bin AND WILL STOP
> LOOKING. So it overrides any "svn" that would be found in /opt/sfw/bin.
>
> The unix "which" command will tell you which of the maybe many "svn"
> there may be on your computer would be THE ONE to be executed.
>
> For historical reasons I use "tcsh" that has a handy command called
> "where" that looks through the entire path listing all "svn" that exist.
> Its a nice convenience to decide where to place a soft link to get the
> version that you want. [Aside: I got an eye opener when I investigated
> which tar/gtar/gnutar/star I wanted to use for my "tar".]
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Now then. Why do you want /opt/csw/bin on the end?
>
> George
> Binod wrote:
> > Sorry for deplayed response, and thanks george for your help.
> >
> > I realized that once I set /opt/csw/bin in the very front of my path
> > then all of my svn commands worked fine.
> >
> > Previously I had installed svn in /usr/local/bin which i got from
> > sunfreeware. I removed it from there and, therefore, previously when I
> > ran svn command it was trying to take svn command from that path.
> >
> > It was in this format when it didnot work:
> >  >>>>>>>>>>>>>>>>>
> > -bash-3.00$ echo $PATH
> >
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin
> >
> >
> >
> > Now it is in this format and my svn commands just work fine:
> >  >>>>>>>>>>>>>>
> > -bash-3.00$ echo $PATH
> >
> /opt/csw/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:
> >
> >
> > But my question now would be is there anyway possible for me to still
> > keep /opt/csw/bin at the end of my PATH and still make my svn command
> work ?
> >
> > Any help would be appreciated and if this is wrong place to post this
> > question any direction to the right place would also be a great help.
> >
> > Thanks,
> >
> >
> >
> >
> >
> >
> > On 9/26/07, *George Wyche* <gwyche at io.com <mailto:gwyche at io.com>> wrote:
> >
> >     @Binod
> >
> >     svn may be an alias. Do a
> >       which svn
> >
> >     cd /opt/csw/bin
> >     ./svn
> >
> >     would override any svn alias.
> >
> >      > Hi I installed subversion from blastwave couple days ago
> >      > and every thing is working fine. Its in sparc 10 x64.
> >      >
> >      > My path currently is
> >      >
> >      > -bash-3.00$ echo $PATH
> >      > /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:\
> >      > /usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin
> >      >
> >
> >     If you are intending on using blastwave software, then please move
> >     /opt/csw/bin to occur before /usr/sfw/bin
> >
> >     And you will probably have to examine /usr/local/bin closely for
> links
> >     which might otherwise override your specified order. For example
> even if
> >     you have /opt/csw/bin:/usr/sfw/bin, but a link in /usr/local/bin
> >     *could*
> >     have an gnutar which points to a gnutar in /usr/sfw/bin NOT in
> >     /opt/csw/bin. That would be an override. That sort of think has
> given me
> >     grief in the past.
> >
> >      > but when I type svn I can't get it work.
> >      >
> >      > -bash-3.00$ svn
> >      > -bash: svn: command not found
> >      >
> >      > But when I go to
> >      >
> >      > cd /opt/csw/bin and then do ./svn It works fine.
> >      >
> >      > I went ahead and added that /opt/csw/bin (which is a
> >      > global path to my local user .profile file then svn
> >      > commands just work fine)
> >      >
> >      > What is going wrong here ? Can anyone help me out?
> >      >
> >      > I think if /opt/csw/bin is in global path it should
> >      > be able to run from anywhere without needing to
> >      > provide detail in local.profile file , isn't
> >      > thats how it works?
> >
> >     That is my understanding. You could look at the permissions, owners,
> >     groups, links associated with each step of the way to
> /opt/csw/bin/svn.
> >     ls -l /
> >     ls -l /opt
> >     ls -l /opt/csw
> >     ls -l /opt/csw/bin
> >     ls -l /opt/csw/bin/svn
> >
> >     Look for "strange" things.
> >
> >     Is there something else in
> >      >
> >      > Any help will be appreciated.
> >      >
> >      > Thanks,
> >
> >
> >     George
> >
> >     _______________________________________________
> >     users mailing list
> >     users at lists.blastwave.org <mailto:users at lists.blastwave.org>
> >     https://lists.blastwave.org/mailman/listinfo/users
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > users mailing list
> > users at lists.blastwave.org
> > https://lists.blastwave.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at lists.blastwave.org
> https://lists.blastwave.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencsw.org/pipermail/users/attachments/20071003/a2c19d16/attachment-0002.html>


More information about the users mailing list