Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

where the heck is /usr/local/bin?, who the heck is "wheel"?

I just want to write some perl scripts for some simple operations. This should be more than a little easy on OS, which is based on Unix. I drafted a script in a plain text editor and attempted to save it to an appropriate place on the PATH. The editor couldn't find it (/usr/local/bin). I ls -l's /usr/local - bin exists, but I do not have write permissions there - only "wheel" does. What's with this? /usr/local/bin is meant for loca (i.e. my, rather than system) use. And anyway, why is it invisible. Can't find it with Finder.

iMac (Intel), Mac OS X (10.6.1)

Posted on Apr 14, 2010 3:44 PM

Reply
6 replies

Apr 14, 2010 4:19 PM in response to jkr98116

Open the Terminal application and type the following->

sudo chflags nohidden /usr

While you're at it reveal the /private directory->

sudo chflags nohidden /private


Now you will have access to the important "Unix" directories in the Finder. You must be the root user in order to change or put any files in these directories . So, you will have to use the Terminal.

Apr 14, 2010 4:44 PM in response to jkr98116

As Mark says you can only write to /usr as root so Terminal is the way to go there. You can however browse most of the UNIXy directories using Finders "Go To Folder..."command under the "Go" menu. This may be better than changing the folder to visible as many, many people (who know less than you) have deleted such folders "knowing" that they weren't required by their Macs. Just sayin...

Dan

Apr 14, 2010 5:44 PM in response to jkr98116

I just want to write some perl scripts for some simple operations. This should be more than a little easy on OS, which is based on Unix.

Apple goes to a lot of trouble to hide the Unix complexities from its typical consumer base. One of the things they really want to keep the typical consumer away from are the directories involved in running the operating system.
I drafted a script in a plain text editor and attempted to save it to an appropriate place on the PATH. The editor couldn't find it (/usr/local/bin).

Most GUI editors will not find the Unix specific directories. As someone else has pointed out, they are marked hidden. Again this is so that the typical Apple consumer customer will not mess with them.

There are GUI text editors that will ignore the hidden flag, such as TextWrangler (free download)
<http://www.versiontracker.com/dyn/moreinfo/macosx/18529>

I ls -l's /usr/local - bin exists, but I do not have write permissions there - only "wheel" does. What's with this?

Wheel is also know as the "Big Wheel", the "Big Cheese", "Top Banana", etc... On my system /usr/local/bin is owned by root with /usr/local/bin being in the group wheel. However, on my system ONLY root can write into /usr/local/bin.
/usr/local/bin is meant for loca (i.e. my, rather than system) use.

Going back to traditional Unix, where there were lots of users sharing a system, /usr/local/bin was where the local adminstrator would store executables for all local users to use that would not polute the official Unix distribution executables. But, /usr/local/bin still required root privilege before you could write into it, otherwise anyone could mess with those files, and install a malicous program.

The convention was that users would create a $HOME/bin where they would put their personal scripts and programs. They would also add $HOME/bin to the PATH environment variable in their shell initialization file (bash would be .bash_profile).
And anyway, why is it invisible. Can't find it with Finder.

As mentioned earlier Apple does its very best to hide the Unix underside. They are selling an easy to use GUI based operating system, not Unix. Also, throw enough users without Unix experience, and statistically, enough of them will delete essential files in /bin, /sbin, /usr, /etc/, etc... so that they would destroy their system without knowing it, and then Apple would get a phone call. It is easier to hide those files, as most GUI oriented users do not need them, and use the Unix file protections to place another road block between typical users and destruction.

There is an option you can change that will cause the Finder to see all files.

defaults write com.apple.Finder AppleShowAllFiles TRUE

Now restart the Finder

killall Finder

Change TRUE to FALSE and the Finder will stop showing hidden files.

where the heck is /usr/local/bin?, who the heck is "wheel"?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.