Welcome, Guest. Please login or register.

Author Topic: Does Mac OSX have a 'C' like directory?  (Read 3528 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline save2600Topic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 3261
  • Country: us
    • Show only replies by save2600
Does Mac OSX have a 'C' like directory?
« 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!  :-(
 

Offline gazgod

  • Sr. Member
  • ****
  • Join Date: Sep 2005
  • Posts: 282
    • Show only replies by gazgod
    • http://www.lincsamiga.org.uk
Re: Does Mac OSX have a 'C' like directory?
« Reply #1 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

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Does Mac OSX have a 'C' like directory?
« Reply #2 on: October 11, 2009, 09:03:54 PM »
Have you tried putting it in /usr/local/bin/ ?
 

Offline Jope

Re: Does Mac OSX have a 'C' like directory?
« Reply #3 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
 

Offline save2600Topic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 3261
  • Country: us
    • Show only replies by save2600
Re: Does Mac OSX have a 'C' like directory?
« Reply #4 on: October 12, 2009, 01:27:50 PM »
Thanks all for the link and tips! /usr/bin is what I was after  :-)
 

Offline persia

  • Hero Member
  • *****
  • Join Date: Sep 2006
  • Posts: 3753
    • Show only replies by persia
Re: Does Mac OSX have a 'C' like directory?
« Reply #5 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
[SIGPIC][/SIGPIC]

What we\'re witnessing is the sad, lonely crowing of that last, doomed cock.
 

Offline gazgod

  • Sr. Member
  • ****
  • Join Date: Sep 2005
  • Posts: 282
    • Show only replies by gazgod
    • http://www.lincsamiga.org.uk
Re: Does Mac OSX have a 'C' like directory?
« Reply #6 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.

Offline persia

  • Hero Member
  • *****
  • Join Date: Sep 2006
  • Posts: 3753
    • Show only replies by persia
Re: Does Mac OSX have a 'C' like directory?
« Reply #7 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.
[SIGPIC][/SIGPIC]

What we\'re witnessing is the sad, lonely crowing of that last, doomed cock.
 

Offline DiskDoctor

  • Sr. Member
  • ****
  • Join Date: Jan 2009
  • Posts: 308
    • Show only replies by DiskDoctor
Re: Does Mac OSX have a 'C' like directory?
« Reply #8 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
Was: Mac Mini PPC running MorphOS 2.4
Now: Amiga Forever 2010 with AmiKit and AmigaSYS
Not used: Icaros Desktop 1.2 (reason: no wifi)
Planned soon: an OS4 system
Shortly then: a MOS notebook (wifi is a must-have)