Macos – executing unix code from the terminal

macmacosterminalunix

I have a directory on my hard drive that contains a collection of Unix executable files that I am trying to run from the terminal. When I browse the directory from the terminal it shows all the files are there but when I enter the name of one of the Unix executables it says '-bash orca: command not found'(the executable is called 'orca'). If I browse to the folder in the finder and click on that same file, a terminal window appears and runs the file. However, because the program requires that I specify an input file, I get the following returned:

/Users/damonrobles/Documents/orca_macosx_r2360/orca ; exit;
Damon-Robless-MacBook-Pro:~ damonrobles$ /Users/damonrobles/Documents/orca_macosx_r2360/orca ; exit;
This program requires the name of a parameterfile as argument
For example ORCA TEST.INP 
logout

[Process completed]

According to the program manual, I should call the program from the terminal as follows:

nohup orca Inputfile.inp >& outputfile.out

but when I do this it simply generates an output file that says:

nohup: orca: No such file or directory 

and returns me to the terminal prompt. I can't figure out what the heck the problem is, although I am a novice terminal user so I'm sure it's something dumb on my part. Any help is greatly appreciated! I'm on a MacBook Pro, running OSX 10.6.8.

Best Answer

You'll want to use ./orca instead of just orca. In OS X, the current directory (.) isn't in $PATH by default, so you can't execute programs in the current directory without explicitly naming it.

Related Question