I've just created my first Command Line Tool in Xcode.
What do I have to do, or where do I have to put the final output file, so that I can run it from anywhere from within terminal, without having to go to the directory the actual Unix Executable File is in.
An example of this is the Java and Git executables, which I can run in the terminal regardless of the location I'm in.
Best Answer
You can add the location into your executable path.
Step 1: Use an editor to open ~/.profile
Step 2: Add the actual path into the file. For example, I added /Users/work/documents/fun/scripts into it and my ~/.profile looks like
Step 3: Restart terminal, and issue which command. You should see the path of your program, and should be able to run the program regardless of your location.
Or another way, move the program into the existing executable path. To see existing executable path.