Re: executable problem
n Fri, Mar 16, 2001 at 01:46:48PM +, Colin Watson wrote: > Marcelo Chiapparini <[EMAIL PROTECTED]> wrote: > >I've just compiled a FORTRAN program but I am unable to run the > >executable, because "bash: qhdiv0.e: command not found". I think > >this is because the present directory it is not in the PATH. > > Just so you know why this is considered a bad idea: you might be in > /tmp, say, and want to see the contents of the directory, so you type > 'ls'. What if some other user has created an executable in /tmp/ls? This > sort of thing is why people will advise you just to get used to typing > './qhdiv0.e' instead. > I would like to thanks to all the people who taught me about this. I will follow the healthy way and use ./ instead of modify the PATH. Thanks again, ___ Marcelo Chiapparini DFT-IF/UERJ [EMAIL PROTECTED]
Re: executable problem
Marcelo Chiapparini <[EMAIL PROTECTED]> wrote: >I've just compiled a FORTRAN program but I am unable to run the >executable, because "bash: qhdiv0.e: command not found". I think >this is because the present directory it is not in the PATH. Just so you know why this is considered a bad idea: you might be in /tmp, say, and want to see the contents of the directory, so you type 'ls'. What if some other user has created an executable in /tmp/ls? This sort of thing is why people will advise you just to get used to typing './qhdiv0.e' instead. Cheers, -- Colin Watson [EMAIL PROTECTED]
Re: executable problem
Marcelo Chiapparini <[EMAIL PROTECTED]> writes: MC> I've just compiled a FORTRAN program but I am unable to run the MC> executable, because "bash: qhdiv0.e: command not found". I think MC> this is because the present directory it is not in the PATH. You should run './qhdiv0.e', then. This explicitly includes the location of the binary (the current directory), which avoids user confusion. Putting . into PATH is considered by many to be a poor idea. MC> Please, I need to know: MC> a) where is the file where the PATH is defined MC> b) what should I write in it PATH is generally set in .bashrc or .bash_profile. To add a personal binary directory to the path, you might add 'PATH=$PATH:$HOME/bin' to an appropriate one of those files. See bash(1) (or archives of debian-user, if you're so inspired) for the difference. -- David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/ "Theoretical politics is interesting. Politicking should be illegal." -- Abra Mitchell
Re: executable problem
on Thu, Mar 15, 2001 at 05:24:28PM -0300, Marcelo Chiapparini ([EMAIL PROTECTED]) wrote: > Hi, > > I've just compiled a FORTRAN program but I am unable to run the > executable, because "bash: qhdiv0.e: command not found". I think > this is because the present directory it is not in the PATH. Please, > I need to know: > a) where is the file where the PATH is defined > b) what should I write in it Specify full (or relative) path. If the executable is in your current directory: ./qhdiv0.e Cheers. -- Karsten M. Self http://kmself.home.netcom.com/ What part of "Gestalt" don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org pgpiXA2NT0P7z.pgp Description: PGP signature
Re: executable problem
Hi, if you want to run a program in your current directory, you should type: ./program-to-run ./ forces bash to look in the current directory. If you want to add this to your path, you can edit .bashrc in your homedir. Add a line like: PATH=$PATH:./ but do not catch me on this one. My bash is not that well. Do no forget to log in again to activate it. Greetz, Sebastiaan On Thu, 15 Mar 2001, Marcelo Chiapparini wrote: > Hi, > > I've just compiled a FORTRAN program but I am unable to run the > executable, because "bash: qhdiv0.e: command not found". I think > this is because the present directory it is not in the PATH. Please, > I need to know: > a) where is the file where the PATH is defined > b) what should I write in it > > I am running bash... > > Thanks in advance! > -- > ___ > Marcelo Chiapparini > DFT-IF/UERJ > [EMAIL PROTECTED] > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > >