New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

/usr???


Post Reply New Thread Subscribe

 
Thread Tools
Thundermoon1994

 
Thundermoon1994's Avatar
 
Member Since: Dec 26, 2006
Location: Kent, OH
Posts: 495
Thundermoon1994 will become famous soon enough
Mac Specs: 15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB

Thundermoon1994 is offline
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.

-- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
-- 8 GB iPhone 3G -- 30 GB iPod Video --
QUOTE Thanks
powermacj7

 
powermacj7's Avatar
 
Member Since: Mar 22, 2007
Location: NY NY
Posts: 403
powermacj7 will become famous soon enough
Mac Specs: iMac Duo White

powermacj7 is offline
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....
QUOTE Thanks
Del

 
Member Since: Dec 24, 2006
Location: N. Ireland
Posts: 901
Del has a spectacular aura about
Mac Specs: Mac Pro 2xQuad core 2.8GHZ

Del is offline
Quote:
Originally Posted by powermacj7 View Post
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?
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 3,028
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
/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.

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks
Thundermoon1994

 
Thundermoon1994's Avatar
 
Member Since: Dec 26, 2006
Location: Kent, OH
Posts: 495
Thundermoon1994 will become famous soon enough
Mac Specs: 15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB

Thundermoon1994 is offline
Thanks cradom. I was confusing /usr with ~/usr. Now I see where it is. Thanks guys!

-- Unibody 15.4" MacBook Pro (2.4 GHz Core2Duo Penryn, 250 GB HD, 4 GB RAM, nVidia GeForce 9400M & GeForce 9600M GT w/ 256 MB) --
-- 8 GB iPhone 3G -- 30 GB iPod Video --
QUOTE Thanks

Post Reply New Thread Subscribe


« x11 configuration file help | .bat files help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 07:10 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?