Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 12, 2007, 02:22 AM   #1
SHankara
macrumors member
 
Join Date: Oct 2007
usr/local/bin

why doesnt osx come with this directory already?Or do you have to sudo mkdir it yourself?
SHankara is offline   0 Reply With Quote
Old Dec 12, 2007, 02:47 AM   #2
samh004
macrumors 68020
 
samh004's Avatar
 
Join Date: Mar 2004
Location: Australia
I would imagine it'd be hidden so idiots can't screw things up (not implying you). You could try pressing Command + G and then typing the path exactly as you typed here, that might get you there...

Or you could go into Terminal and show hidden files and folders.
__________________
samh004 is offline   0 Reply With Quote
Old Dec 12, 2007, 03:00 AM   #3
SHankara
Thread Starter
macrumors member
 
Join Date: Oct 2007
no its not there,I was wondering why it wouldnt already be there for anybody who wants their own binaries installed there
SHankara is offline   0 Reply With Quote
Old Dec 12, 2007, 05:16 AM   #4
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by SHankara View Post
no its not there,I was wondering why it wouldnt already be there for anybody who wants their own binaries installed there
Because 99.9% of Mac users wouldn't have a clue what you were talking about if you mentioned /usr/local/bin. Apple have probably just decided that those who do know about it also know how to create the directories themselves. Seems reasonable to me.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   1 Reply With Quote
Old Dec 12, 2007, 01:12 PM   #5
ScKaSx
macrumors regular
 
Join Date: Feb 2006
I noticed that too, when I first got my MacBook 10.4.9. I was also surprised because it is quite common in the unix world!

Anyways, you can create it yourself like I did (yes, sudo mkdir /usr/local/bin will work). Or if you use FINK (or darwin ports) some of the programs you install will automatically generate that folder.

Cheers,
ScKaSx
ScKaSx is offline   0 Reply With Quote
Old Dec 15, 2007, 03:22 AM   #6
SC68Cal
macrumors 68000
 
Join Date: Feb 2006
Apple assumes that everyone is as dumb as they are when it comes to UNIX. Or at least the HI people assume it. Whatever.

But then again, I've seen plenty of posts from boasting about how proud they are that they don't know UNIX and don't care for "Terminal"

Anyone ever read this?

http://www.applematters.com/index.ph...was-intuitive/

What a dunce!

Last edited by SC68Cal; Dec 15, 2007 at 03:28 AM.
SC68Cal is offline   -1 Reply With Quote
Old Feb 4, 2009, 04:14 AM   #7
rbot1980
macrumors newbie
 
Join Date: Feb 2009
I am new to using terminal but..

i think you will find your usr/local/bin folder if you drop back a few directories

When I load up terminal it starts me in my user folder (Users/MacPro/) if you:

cd ../../
ls

you will see the usr folder listed
rbot1980 is offline   0 Reply With Quote
Old Feb 4, 2009, 09:06 AM   #8
crackpip
macrumors regular
 
Join Date: Jul 2002
It is my understanding that /usr/local is meant to hold things that an administrator installs on a system, separate from what's included in a vanilla install. Perhaps Apple follows this convention literally. By definition, if you haven't installed any binaries or libraries, you have a vanilla install and thus wouldn't have anything in /usr/local.

crackpip
crackpip is offline   0 Reply With Quote
Old Feb 4, 2009, 09:13 AM   #9
GroovyLinuxGuy
macrumors regular
 
Join Date: Apr 2006
Location: Canada
Quote:
Originally Posted by crackpip View Post
It is my understanding that /usr/local is meant to hold things that an administrator installs on a system, separate from what's included in a vanilla install. Perhaps Apple follows this convention literally. By definition, if you haven't installed any binaries or libraries, you have a vanilla install and thus wouldn't have anything in /usr/local.

crackpip

I just create /usr/local/bin as soon as I do an install, but most of my scripts live in bin in my home directory. If you make it, OS X will include it in its $PATH automatically (at least I don't remember adding it to $PATH).
__________________
"My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
GroovyLinuxGuy is offline   1 Reply With Quote
Old Feb 4, 2009, 09:15 PM   #10
crackpip
macrumors regular
 
Join Date: Jul 2002
Quote:
Originally Posted by GroovyLinuxGuy View Post
I just create /usr/local/bin as soon as I do an install, but most of my scripts live in bin in my home directory. If you make it, OS X will include it in its $PATH automatically (at least I don't remember adding it to $PATH).
Nothing wrong with that unless you have a bunch of other users using your binaries.

On a couple of my machines I have to use special versions of the kerberos binaries, and kerberized versions of openSSH. I stick those in /usr/local/bin so that I don't overwrite the default versions in case it would screw with OS X. But, they are still easily available to other users.

crackpip
crackpip is offline   0 Reply With Quote
Old Feb 5, 2009, 02:26 PM   #11
GroovyLinuxGuy
macrumors regular
 
Join Date: Apr 2006
Location: Canada
Quote:
Originally Posted by crackpip View Post
Nothing wrong with that unless you have a bunch of other users using your binaries.

crackpip
No...those are my binaries...go away and get your own...

True enough, I was thinking on more of a single user system, I don't know why, but that was the impression that I got from the original post. Just to add, I usually create an /opt directory as well to put bigger packages in and symlink them back to /usr/local/bin for convenience
__________________
"My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
GroovyLinuxGuy is offline   0 Reply With Quote
Old Jul 20, 2011, 03:49 PM   #12
webfoot
macrumors newbie
 
Join Date: Jul 2011
Hi,

I actually know nothing about this (I am a graphic designer), however my "Computer Savvy" 9 1/2 year old son would like to offer the following suggestions:

"Hi, To go into the usr/local/bin directory open Terminal then type (In 1 line)
"cd ../..; cd usr; open ." Then hit enter. It will open a new finder window that is directly inside the usr folder. Then you can double click on local then bin to go into usr/local/bin. Just to tell you guys the usr folder is invisible and is only visible in Terminal. I hope this helps! I bet you are surprised about how young I am. From, Justin"

Hi this is Justin again,

To go to the opt folder: Open a new Terminal window type (In 1 line)
"cd ../..; cd opt; open ."
This will also open a new finder window that will have the opt folder opened without you having to make it.

Last edited by Hellhammer; Jul 20, 2011 at 04:07 PM. Reason: Consecutive posts - Please use MULTIQUOTE or EDIT
webfoot is offline   0 Reply With Quote
Old Jul 20, 2011, 04:57 PM   #13
Hansr
macrumors 6502a
 
Join Date: Apr 2007
Quote:
Originally Posted by webfoot View Post
Hi,

I actually know nothing about this (I am a graphic designer), however my "Computer Savvy" 9 1/2 year old son would like to offer the following suggestions:

"Hi, To go into the usr/local/bin directory open Terminal then type (In 1 line)
"cd ../..; cd usr; open ." Then hit enter. It will open a new finder window that is directly inside the usr folder. Then you can double click on local then bin to go into usr/local/bin. Just to tell you guys the usr folder is invisible and is only visible in Terminal. I hope this helps! I bet you are surprised about how young I am. From, Justin"

Hi this is Justin again,

To go to the opt folder: Open a new Terminal window type (In 1 line)
"cd ../..; cd opt; open ."
This will also open a new finder window that will have the opt folder opened without you having to make it.
cd ../.. is not needed cd /usr or /opt is simpler. Open . will not create a folder it will just open a new Finder window in the current folder. /usr/local/bin should be created manually because will MacOSX doesn't ship with any user specific binaries, ergo create it once needed.
Hansr is offline   0 Reply With Quote
Old Jul 20, 2011, 06:58 PM   #14
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by Hansr View Post
cd ../.. is not needed cd /usr or /opt is simpler. Open . will not create a folder it will just open a new Finder window in the current folder. /usr/local/bin should be created manually because will MacOSX doesn't ship with any user specific binaries, ergo create it once needed.
No cd is needed at all. This suffices:
Code:
open /usr
Also:
Code:
mkdir -p /usr/local/bin
It creates intermediate directories as needed. So if /usr/local doesn't exist, it creates it. If it does exist, it uses the existing one.



And when I was 9 1/2 I was into things made from old clock mainsprings (several types of GI Joe crossbow come to mind), chemistry, lenses, and ants. These might not be something you'd mention to an actual 9 1/2-year-old, though I'm not sure which is more dangerous: those things or 'rm -fR / &'.

Last edited by chown33; Jul 20, 2011 at 07:14 PM.
chown33 is offline   0 Reply With Quote
Old Jul 22, 2011, 05:02 PM   #15
webfoot
macrumors newbie
 
Join Date: Jul 2011
Quote:
Originally Posted by Hansr View Post
cd ../.. is not needed cd /usr or /opt is simpler. Open . will not create a folder it will just open a new Finder window in the current folder. /usr/local/bin should be created manually because will MacOSX doesn't ship with any user specific binaries, ergo create it once needed.
But it is already created for you.
Why would you create it if it is already there?
"cd /usr" and "cd /opt" is definitely simpler but "cd../..; cd usr; open ." and "cd ../..; cd opt; open ." was the first thing I thought of.
Also, if you want the finder window with that folder showing, just add ";open .".
webfoot is offline   0 Reply With Quote
Old Jul 22, 2011, 07:40 PM   #16
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Originally Posted by webfoot View Post
But it is already created for you.
Why would you create it if it is already there?
"cd /usr" and "cd /opt" is definitely simpler but "cd../..; cd usr; open ." and "cd ../..; cd opt; open ." was the first thing I thought of.
Also, if you want the finder window with that folder showing, just add ";open .".
The OP wanted to know about /usr/local/bin, not /usr/opt/bin. /usr/local/bin is standard on Linux (other Unix's as well?).
jiminaus is offline   -1 Reply With Quote
Old Jul 22, 2011, 08:09 PM   #17
subsonix
macrumors 68030
 
Join Date: Feb 2008
There's no such thing as a Linux standard. It's not standard UNIX since OS X conforms to the UNIX specification. There is a /usr/local which is for executables and and libraries not included by the basic OS.
subsonix is online now   1 Reply With Quote
Old Jul 22, 2011, 08:25 PM   #18
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Originally Posted by subsonix View Post
There's no such thing as a Linux standard.
I was about to counter with a quote from the Linux Filesystem Hierarchy Standard, but discovered it's not the Linux FHS but just the FHS. Unless your were being pedantic (rightly so?) about Linux the kernel verses Linux distros.
jiminaus is offline   0 Reply With Quote
Old Jul 22, 2011, 08:32 PM   #19
subsonix
macrumors 68030
 
Join Date: Feb 2008
My point was that someone could put together a Linux system without a /usr/local/bin and it would still be a Linux system, no? It could be anything using the Linux kernel, how many Linux distros are there? Just a couple of thousands or so. Don't worry though, I'm not being completely serious, it's just that Linux always struck me as kind of wild and uncontrolled.
subsonix is online now   0 Reply With Quote
Old Aug 31, 2011, 11:39 PM   #20
LrsRMnt2BBrkn
macrumors newbie
 
Join Date: Aug 2011
go to teminal and input "open /usr/local/bin
LrsRMnt2BBrkn is offline   -1 Reply With Quote
Old Aug 31, 2011, 11:57 PM   #21
foidulus
macrumors 6502a
 
Join Date: Jan 2007
Quote:
Originally Posted by subsonix View Post
There's no such thing as a Linux standard. It's not standard UNIX since OS X conforms to the UNIX specification. There is a /usr/local which is for executables and and libraries not included by the basic OS.
Well I guess now we are getting into semantics, yes its not part of the unix standard, but it a unix convention. We were using /usr/local/bin on Irix machines in the late 80s/early 90s before Linux even existed
foidulus is offline   0 Reply With Quote
Old Sep 1, 2011, 12:18 AM   #22
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by foidulus View Post
Well I guess now we are getting into semantics, yes its not part of the unix standard, but it a unix convention. We were using /usr/local/bin on Irix machines in the late 80s/early 90s before Linux even existed
Agreed, but it's a convention on OS X as well even though apparently that directory is not created by default on a clean OS install.
subsonix is online now   0 Reply With Quote
Old Feb 8, 2012, 09:38 AM   #23
kamickrn
macrumors newbie
 
Join Date: Feb 2012
I'm having some issues with OS X Lion and the usr/local/bin folder. Essentially it's not there and I keep getting permission denied errors when I try to create it in terminal. When I try to create it in a finder window it says the name is already taken. BUT, when I use the Go function and type in usr/local/bin it says the directory doesn't exist! This is very frustrating and makes no sense at all to my non-programmer brain. My other computer has this directory and it's running Lion....I'm guessing some program I installed must have created the directory for me on my other machine because I certainly did not create it.

I'm trying to install blueutil on both machines and until I get the usr/local/bin folder accessible on this machine the install keeps failing saying the "directory /usr/local/bin does not exit (1) "

If anyone can help I would be greatly appreciative.

Thanks,

Kevin
kamickrn is offline   0 Reply With Quote
Old Feb 8, 2012, 10:08 AM   #24
KnightWRX
macrumors Pentium
 
KnightWRX's Avatar
 
Join Date: Jan 2009
Location: Quebec, Canada
type the following in Terminal :

Code:
sudo mkdir /usr/local; sudo mkdir /usr/local/bin
Anyway, any half decent installer should create directories when they don't exist.

I dunno why people made such a long thread back in 2007 about something so simple. BTW : don't ressurect threads, start your own.

Not to mention this isn't a programming question and does not belong in the programming forum.
__________________
"What you leave behind is not what is engraved in stone monuments, but what is woven into the lives of others."
-- Pericles
KnightWRX is offline   0 Reply With Quote
Old Feb 8, 2012, 10:12 AM   #25
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by KnightWRX View Post
type the following in Terminal :

Code:
sudo mkdir /usr/local; sudo mkdir /usr/local/bin
Anyway, any half decent installer should create directories when they don't exist.
/usr/local should be present already. I would start by checking:

Code:
ls /usr/local/bin
then, if not present.

Code:
mkdir /usr/local/bin
subsonix is online now   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Help with permissions usr/bin/tar garikfox OS X 10.8 Mountain Lion 2 Oct 1, 2013 02:27 AM
Help pls. What have I done? /usr/bin/sudo sunshinee27 OS X 5 Sep 24, 2013 11:50 AM
Ubuntu: Install app in usr/bin fivetoadsloth Windows, Linux & Others on the Mac 0 Apr 9, 2013 09:11 PM
Always open file with this application with /usr/bin/? frank131 OS X 2 Sep 6, 2012 10:55 PM
/usr/local/bin - all my files were removed saka MacBook Pro 1 Aug 7, 2012 12:52 PM

Forum Jump

All times are GMT -5. The time now is 01:28 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC