Amiga.org
Operating System Specific Discussions => Other Operating Systems => Topic started by: save2600 on October 11, 2009, 08:28:11 PM
-
I've got a program I'd like to call upon no matter what directory I'm in while using Terminal. Of course, on the Amiga, all we have to do is copy that program to 'C'. Is there an equivalent drawer in OSX? If not, what's the alternative? Invoking the program each and every time I restart the computer?
Also, when I've tried to "invoke" the program, I always get a "command/program not found" error. I guess I'm a Linux tard and yes, I'm in the directory that the program in in! :-(
-
echo $PATH should return the path on your machine.
/usr/bin is probably the best place to put the program, you can use /bin or /sbin but these should be reserved for system programs and can be wiped during system upgrade (unix standards not apples).
To run a program in your current diectory you should type ./programname to run it and you should try this before you copy a program into any directory in your path.
Gaz
-
Have you tried putting it in /usr/local/bin/ ?
-
/usr/local/bin is the correct place for your own stuff.. IMO it's better to keep the OS clean and not add stuff to /usr/bin or /bin.
The only problem is, that these were removed from the path in 10.2, so you need to add that into your .profile or .bashrc or whatever.
http://www.westwind.com/reference/OS-X/invisibles.html
-
Thanks all for the link and tips! /usr/bin is what I was after :-)
-
I haven't touched my $PATH settings and they include
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin
So I'm not sure anything was removed at 10.2
-
I haven't touched the path in my 10.4.9 install and it only has /bin:/sbin:/usr/bin:/usr/sbin.
-
I'm running 10.6.1, but I have installed XCode tools and X11 installed, maybe oe of those added to my path automatically. You can't really develop for the Mac (or iPhone) without the tools...
I haven't touched the path in my 10.4.9 install and it only has /bin:/sbin:/usr/bin:/usr/sbin.
-
I know because of MorphOS approaching, many such posts will appear gradually.
In most matters regarding Mac OS X system issues there's a general rule that applies in 99%:
See: Linux