LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Cygwin commands execution (https://www.linuxquestions.org/questions/linux-general-1/cygwin-commands-execution-22083/)

max2878 05-29-2002 11:26 AM

Cygwin commands execution
 
Hi everybody,

Well I installed Cygwin in my computer but there is something that I don't understand.

Well it seems that the only commands I can execute are the ones located in the default directory "/cygwin/bin/"

so I compiled a small code in C and try to execute the out put but I could from the directori were I was, so I copy this executable file to the "/cyg/bin/" directory and the I could execute it.

So anybody knows how can I execute any command from any directory?

Thank you for your time.

orgcandman 05-29-2002 11:45 AM

I've been using cygwin for a year now, and I have no problem executing code from any directory. Are you putting a "./" infront of your executable and are you compiling it with gcc? Also, is it a real executable or is it object/byte-compiled code. Sorry for the stupid questions, but sometimes people make foolish mistakes (Like wondering why a filesystem wouldn't show up...turns out in my 3 am daze, I forgot to __make__ the filesystem...oops)

max2878 05-29-2002 11:48 AM

Thanks Orgcandman, using ./ before the command (it is an output of the gcc compiler) executes the .exe file.

verigoth 05-29-2002 07:19 PM

another option is setting the $PATH attribute. by default it is set to /cygwin/bin, but you can change that thusly:
export PATH=/cygwin/bin:/path/to/exe:/other/path

verigoth


All times are GMT -5. The time now is 03:47 AM.