Amiga.org

Operating System Specific Discussions => Other Operating Systems => Topic started by: save2600 on October 11, 2009, 08:28:11 PM

Title: Does Mac OSX have a 'C' like directory?
Post 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!  :-(
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: gazgod on October 11, 2009, 09:03:38 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
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: SamuraiCrow on October 11, 2009, 09:03:54 PM
Have you tried putting it in /usr/local/bin/ ?
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: Jope on October 11, 2009, 09:22:07 PM
/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
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: save2600 on October 12, 2009, 01:27:50 PM
Thanks all for the link and tips! /usr/bin is what I was after  :-)
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: persia on October 12, 2009, 03:20:20 PM
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
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: gazgod on October 12, 2009, 03:52:03 PM
I haven't touched the path in my 10.4.9 install and it only has /bin:/sbin:/usr/bin:/usr/sbin.
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: persia on October 12, 2009, 04:50:46 PM
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...

Quote from: gazgod;525678
I haven't touched the path in my 10.4.9 install and it only has /bin:/sbin:/usr/bin:/usr/sbin.
Title: Re: Does Mac OSX have a 'C' like directory?
Post by: DiskDoctor on October 12, 2009, 07:35:58 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%:

Quote

See: Linux