View Full Version : Does Mac OSX have a 'C' like directory?
save2600
10-11-2009, 01:28 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! :-(
gazgod
10-11-2009, 02:03 PM
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
SamuraiCrow
10-11-2009, 02:03 PM
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
save2600
10-12-2009, 06:27 AM
Thanks all for the link and tips! /usr/bin is what I was after :-)
persia
10-12-2009, 08:20 AM
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
gazgod
10-12-2009, 08:52 AM
I haven't touched the path in my 10.4.9 install and it only has /bin:/sbin:/usr/bin:/usr/sbin.
persia
10-12-2009, 09:50 AM
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.
DiskDoctor
10-12-2009, 12:35 PM
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
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.