PDA

View Full Version : [ubuntu] Help with saving a C program



F1r3st0rm
October 15th, 2010, 01:50 AM
Hello, I am having trouble making an executable C file after I compile it save to my USB and not under my /usr/bin directory. Any help?

GregBrannon
October 15th, 2010, 03:23 AM
More info would be helpful.

Verify that the program runs fine before you move it. Maybe it's a path problem, but it's hard to tell with the info you've provided.

What kind of trouble? If you're getting error messages, post them.

Are you trying to run the same executable on the same machine just from the different location, or are you moving it to another machine and then trying to run it?

anewguy
October 15th, 2010, 04:38 AM
Do an "ls -al" on the file on the USB stick - it probably is rw- e.g. not executable. Just do a chmod to executable to it or do it via "places" and "properties".

To execute: ./filename.extension



Dave ;)

F1r3st0rm
October 17th, 2010, 03:50 PM
More info would be helpful.

Verify that the program runs fine before you move it. Maybe it's a path problem, but it's hard to tell with the info you've provided.

What kind of trouble? If you're getting error messages, post them.

Are you trying to run the same executable on the same machine just from the different location, or are you moving it to another machine and then trying to run it?

The program works fine and I'm just trying to save the executable on USB stick

F1r3st0rm
October 17th, 2010, 03:51 PM
Do an "ls -al" on the file on the USB stick - it probably is rw- e.g. not executable. Just do a chmod to executable to it or do it via "places" and "properties".

To execute: ./filename.extension



Dave ;)

Errr, What's a chmod and an ls -al?