/usr???

Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
So..........I've decided to start learning about UNIX. I've some of the basic concepts down, but I'm a little confused about something. If I'm in the home directory and I type "ls -a", it shows everything in that directory, correct? The tutorial I'm learning from is an old online one from back when OS 10.2 was new. It's right here.

What I'm confused about is that when I type "ls -a" I don't see the directory /usr . However, if I type cd /usr, it takes me to that directory?

This is probably a really basic, newbie, stupid question. If so, I'm sorry.
 
Joined
Mar 22, 2007
Messages
403
Reaction score
7
Points
18
Location
NY NY
Your Mac's Specs
iMac Duo White
ls is similar to dir in dos. It show you the contents of that folder. cd is change directory, meaning you are going to cd /usr.

ls will not take you to a directory, only show you the content....
 

Del


Joined
Dec 24, 2006
Messages
901
Reaction score
15
Points
18
Location
N. Ireland
Your Mac's Specs
Mac Pro 2xQuad core 2.8GHZ
ls is similar to dir in dos. It show you the contents of that folder. cd is change directory, meaning you are going to cd /usr.

ls will not take you to a directory, only show you the content....

Dont think thats the answer to what was asked.

Basically he wants to know why the /usr folder does not get displayed when he runs the ls command.

Is /usr a hidden directory?
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
/usr is hidden in Finder. The problem is /usr isn't in your home dir, it's in the root dir. Try using ls -a / or cd'ing to the root dir and using it.
I use ls -lag to show more information.
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Thanks cradom. I was confusing /usr with ~/usr. Now I see where it is. Thanks guys!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top