Originally Posted by
sunworshipper
John-Smiths-MacBook:desktop smith_j$ ls "/Users/smith_j/Desktop/C Programming Class/repeat 3-27-13 6.49 PM/usr/local/bin/"
repeat
John-Smiths-MacBook:desktop smith_j$ "repeat" resistance is futile
-bash: repeat: command not found
Try:
Code:
"/Users/smith_j/Desktop/C Programming Class/repeat 3-27-13 6.49 PM/usr/local/bin/repeat" resistance is futile
You can't just type "repeat" because the terminal doesn't know what you mean. It doesn't know there's a program called "repeat" somewhere deep in the file system.
If you change into the directory:
Code:
cd "/Users/smith_j/Desktop/C Programming Class/repeat 3-27-13 6.49 PM/usr/local/bin"
Then you can just run it with
The reason you can type some executable names without specfiying where they are is usually because the directory is listed in the PATH environment variable. This is a list of places for the system to look for programs. You can change and add to PATH, but I wouldn't expect you to for a single test program like this. There's no rules saying you can't, but it'd be more hassle than just typing the location of your program.
Apologies if this is all wrong -- I've never actually used a Mac