LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   help with running a Linux program (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-running-a-linux-program-925076/)

naushi 01-22-2012 07:42 AM

help with running a Linux program
 
i have a redhat Linx - i am trying to run a prog that I created but it wont run. it keeps saying prog not found. i am in the right directory - it shows the prog name when I do an ls -l but it wont run. I also tried ./myprog1 but does not find the directory. I also dont know how to see the version of Linux

your help will be greatly appreciated.

willettwork 01-22-2012 08:18 AM

Hiya
 
I'm impressed that you wrote a program. I'm tying to bend my brain around Java.

As to your question. Te only thing I can think of that would interfere Linuz-wize is permissions. You need to have execute permits on the file and the folder it is in.

Satyaveer Arya 01-22-2012 08:26 AM

Welcome to LQ.

Quote:

i am trying to run a prog that I created but it wont run.
You haven't mentioned which program on which software language you wrote?

Quote:

I also tried ./myprog1 but does not find the directory.
Have you given the executable permission to the program file?

And use uname -a command to see the version and all.

naushi 01-22-2012 08:36 AM

got it
 
permission was the issue. it only works with ./ - however when I create a new file it assigns and S to the owner executable . like rwxrwSrwx. but I can do anything with the file though.

thanks a lot

Satyaveer Arya 01-22-2012 08:50 AM

Now if your problem has been solved, you can mark it as SOLVED.


All times are GMT -5. The time now is 08:49 AM.