How do I execute a program I wrote?

If you named your program "test", then you are probably executing the Unix command named "test" instead of your program. Name your program something else.

If you are getting "permission denied", check to make sure that you have execute permission for that file. Compilers usually give you execute permission when they create the executable, but editors do not! This is a common problem when writing shell scripts.

If you are getting "command not found" even though "ls" shows the file to exist, then try specifying what directory the file is in. For example, instead of using

% a.out
try
% ./a.out

Note: For information on logging into Eniac, please see "How Do I Log Into Eniac?"

© Computing and Educational Technology Services | Report a Problem
cets@seas.upenn.edu | 215.898.4707