[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why can't I run my program (how do i set ./ on the path permanently)



Wendell Buckner wrote:
> 
> Thanks  for responding to message:
> 
> Stephan Hachinger
> Seth R Arnold
> Alvin Oga
> Ben Collins
> 
> I indeed needed to type "./hello"!  I knew it was simple!  Now, another
> stupid question for you... How do I add "./" to my path on startup? Also,
> what is the EASIEST way to find the answers to my question before bothering
> you guys?  I'd like to save my hard questions for you guys(the list) instead
> of bothering you with simple ones that I should be able to handle myself.
> My options are the (1) man pages, (2) existing unix books I have and (3) the
> net. I don't want to buy any more books yet, so I'm hoping the ones I have
> will suffice for now. Please give me some hints on searching for the answers
> to this information myself.  Thank you!
> 
> This list has been excellent resource in helping me set up my debian linux
> box!
> 
> -Wxb1
> 
> -----Original Message-----
> From: Stephan Hachinger <Stephan.Hachinger@gmx.de>
> To: Wendell Buckner <wxb1@erols.com>
> Cc: Debian User <debian-user@lists.debian.org>
> Date: Monday, September 06, 1999 3:16 AM
> Subject: Re: Why can't I run my program
> 
> >
> >>----- Original Message -----
> >>From: Wendell Buckner
> >>To: Debian Users Group
> >>Sent: Monday, September 06, 1999 6:13 AM
> >>Subject: Why can't I run my program
> >>
> >>
> >>I was playing around with GNU C before I getting ready to load GNU C++,
> and
> >decided to write a simple c program (The standard hello world app).  I was
> >doing this to make sure >that GNU C was working properly. I compiled the
> >application as follows:
> >>
> >>gcc -v hello.c -o hello
> >>
> >>I thought this would be a simple process but it seems I am missing
> >something trivial.  I attempt to run the program after compiling and bash
> >says:
> >>
> >>bash :hello :command not found
> > >
> >>HUH?  I know there is a simple explaination for this, but I can't seem to
> >find it.  I do a ls -l to check rights and everthing seems o.k.  The file
> >also appears to be an executable.  I've >even tried to run it as the
> >supervsr (su) as well but no dice. Any ideas?
> >>
> >>-Wxb1
> >
> >Are you sure you have typed ./hello to run it??
> >
> >Hope this helps,
> >Stephan Hachinger

You simply add . to your path. However, I'm not sure you want to do
this. As a normal user, it might not be much of an issue, but if you
were to do this for root and then root was rummaging around in someone's
personal directory and did an "ls", and that person had built an "ls"'
command that listed files like "ls" does but also tinkers in the system
files giving that user root access, root might never know that he had
just opened his system up to a ne'er-do-well.


Reply to: