• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hidden Folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hidden Folders


  • Subject: Re: Hidden Folders
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Mon, 10 Jan 2005 15:40:22 -0600

On Jan 10, 2005, at 9:12 AM, Gil Dawson wrote:

Could someone please explain how I can see these directories...
/usr/bin
/sw/bin/
/usr/local/bin/
...on my machine?

I'm using 10.3.7.

These directories are not shown in Finder.app by default because they are more concerned with the Unix end of Mac OS X than the GUI end. They typically store Unix executables, which typically are invoked via the command line and take command line arguments and/or keyboard entry via standard input. It therefor might be useful to know how to "see" these directories in the shell environment. Knowing how to see them in a Finder window is also often useful, and others have already shown a few ways to do that.


You can view the contents of any directory (or folder, if you prefer) in the Terminal using the ls command.

(in the following examples, the command line prompt is denoted by "$ ")

The manual page (manpage) for `ls` lists a variety of usage options.

$ man ls

$ ls /usr/local/bin

To view a list of the directory contents in long format (which includes timestamps, file sizes, and other useful info):

$ ls -l /usr/local/bin

To show all files, normal and hidden, except the pointer to the parent directory and the current directory (.. and ., respectively):

$ ls -A /usr/local/bin

And, I find it helpful to turn on colorized output, which renders filenames in different colors depending on type and permissions:

$ ls -G /usr/local/bin

Or, what I most often use, a combination of the three above:

$ ls -AlG /usr/local/bin

I use these enough to have created a couple of aliases in my .profile (a text file that is read when your shell initializes its environment... in some cases).

# First I turn on colorization by default:
alias ls="/bin/ls -G"
# Then another alias for long format and hidden files:
alias l="ls -Al"

Now 'ls' acts like 'ls -G', and 'l' acts like 'ls -AlG'.  Suits me.

More information about .profile and aliases can be found in the bash manpage:
$ man bash


Everything I needed to know about the command line I learned in "Learning Unix for Mac OS X Panther," published by O'Reilly. The book is written for complete neophytes and does not even assume working knowledge of the term "path". I highly recommend it.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Hidden Folders
      • From: Bill Briggs <email@hidden>
References: 
 >Hidden Folders (From: Gil Dawson <email@hidden>)

  • Prev by Date: Re: A request
  • Next by Date: Re: forbidden characters in applescript
  • Previous by thread: Re: Hidden Folders
  • Next by thread: Re: Hidden Folders
  • Index(es):
    • Date
    • Thread