i think that only one dot "." is enough,like
export PATH=$PATH:.
but, doing this is a little danger......

2010/3/4 <egg...@gmail.com>

> On Wed, Mar 03, 2010 at 01:40:35PM -0800, Chris Miller wrote:
> > If you *append* . to the path that isn't a problem.  If you prepended
> > it, then you're pretty much leaving your fly down for anyone to mess
> > with you.
> >
> > (I use this little precedence trick all the time to replace system
> > supplied software with custom builds which I put in ~/.bin)
> >
> > Why .bin?  Because then Finder ignores it and I don't have to see my
> > user bin dir in my GUI.  Easy squeezy lemon peazy.
> >
> > On Tue, Mar 2, 2010 at 7:41 AM,  <egg...@gmail.com> wrote:
> > > On Tue, Mar 02, 2010 at 08:47:54PM +0530, Ravindra Patil wrote:
> > >>    just add "."(dot in the path) as follows.
> > >>    export PATH=$PATH:.
> > >>    On Tue, Mar 2, 2010 at 8:38 PM, Echooff3 <[1]
> john.skibicki....@gmail.com>
> > >>    wrote:
> > >>
> > >>      Hi,
> > >>      I was just curious, is there any one line trick to add my pwd to
> my
> > >>      path? Something to the effect of:
> > >>      export PATH=$PATH:<pwd
> > >>
> > >>      So, if my present working directory was ~/Documents that would
> get
> > >>      appended to the path.
> > >>      --
> > >>      You received this message because you are subscribed to the Linux
> Users
> > >>      Group.
> > >>      To post a message, send email to [2]
> linuxusersgroup@googlegroups.com
> > >>      To unsubscribe, send email to
> > >>      [3]linuxusersgroup-unsubscr...@googlegroups.com
> > >>      For more options, visit our group at
> > >>      [4]http://groups.google.com/group/linuxusersgroup
> > >>
> > >>    --
> > >>    Thanks & Regards,
> > >>    Ravindra M. Patil
> > >>
> > >>    --
> > >>    You received this message because you are subscribed to the Linux
> Users
> > >>    Group.
> > >>    To post a message, send email to linuxusersgroup@googlegroups.com
> > >>    To unsubscribe, send email to
> linuxusersgroup-unsubscr...@googlegroups.com
> > >>    For more options, visit our group at
> > >>    [5]http://groups.google.com/group/linuxusersgroup
> > >>
> > >> References
> > >>
> > >>    Visible links
> > >>    1. mailto:john.skibicki....@gmail.com
> > >>    2. mailto:linuxusersgroup@googlegroups.com
> > >>    3. mailto:linuxusersgroup-unsubscr...@googlegroups.com
> > >>    4. http://groups.google.com/group/linuxusersgroup
> > >>    5. http://groups.google.com/group/linuxusersgroup
> > > Just to clarify the two responses - Jerry took you literally and told
> > > you how to add the directory you're in now to the path. Ravindra told
> > > you how to make sure the pwd is always in your path.
> > >
> > > Now let me explain why this second one can be dangerous.  Let's say
> that you
> > > frequently use gpg on the command line, and somebody knows this. Now
> > > let's say that person has regular user access to your system (generally
> > > considered mostly harmless). Now, if you go to /tmp and decide to
> > > encrypt or sign a file there, it would be painfully simple for them to
> > > have placed a 'gpg' standin in /tmp, with world execute. So, while in
> > > tmp you would run *their* gpg instead of the system one.  You are
> > > effectively opening yourself to accidental arbitrary code execution.
> Now
> > > if their program intercepted your passphrase and sent your private key
> > > off to some nefarious server, they can now sign files as you, and
> > > decrypt documents meant for you.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Linux Users
> Group.
> > > To post a message, send email to linuxusersgroup@googlegroups.com
> > > To unsubscribe, send email to
> linuxusersgroup-unsubscr...@googlegroups.com
> > > For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
> >
> >
> >
> > --
> > Registered Linux Addict #431495
> > For Faith and Family! | John 3:16!
> > http://www.fsdev.net/
> >
> > --
> > You received this message because you are subscribed to the Linux Users
> Group.
> > To post a message, send email to linuxusersgroup@googlegroups.com
> > To unsubscribe, send email to
> linuxusersgroup-unsubscr...@googlegroups.com
> > For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
> Good call; thanks for correcting me Chris.  if *appended* the only time
> this becomes a security hole is if you try to run a program that doesn't
> exist on the system.
>
> --
> You received this message because you are subscribed to the Linux Users
> Group.
> To post a message, send email to linuxusersgroup@googlegroups.com
> To unsubscribe, send email to linuxusersgroup-unsubscr...@googlegroups.com
> For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup
>

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to linuxusersgroup@googlegroups.com
To unsubscribe, send email to linuxusersgroup-unsubscr...@googlegroups.com
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to