Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > cd command not working?

cd command not working?
Thread Tools
benschilke
Registered User
Join Date: Jan 2001
Location: new brunswick, nj
Status: Offline
Reply With Quote
May 19, 2002, 10:25 PM
 
I'm new at UNIX, so I apoligize if this is a simple question or has been asked before (I did just do a search on it).

For some reason I'm unable to change directories using cd for certain directories. In my default "home" directory, I can't seem to go to Pictures, or Desktop or another folder I created.

I'm using: cd /Pictures
and it's reading: /Pictures: No such file or directory.

Any ideas?

[I can move to the Documents and Library folders, however.]

[ 05-19-2002: Message edited by: benschilke ]
     
tinrib
Mac Elite
Join Date: Feb 2001
Location: Bristol, UK, living in Melbourne, Australia
Status: Offline
Reply With Quote
May 19, 2002, 10:33 PM
 
Originally posted by benschilke:
<STRONG>I'm new at UNIX, so I apoligize if this is a simple question or has been asked before (I did just do a search on it).

For some reason I'm unable to change directories using cd for certain directories. In my default "home" directory, I can't seem to go to Pictures, or Desktop or another folder I created.

I'm using: cd /Pictures
and it's reading: /Pictures: No such file or directory.

Any ideas?</STRONG>
yep do cd Pictures

/ is the root of your hard drive - where your Applications/Library/System/Users folder is

if you want to go straight to your Pictures folder from anywhere do cd ~/Pictures

~ is your home directory.
     
maddjn
Junior Member
Join Date: May 2002
Location: germany
Status: Offline
Reply With Quote
May 20, 2002, 08:55 AM
 
in 'cd Pictures' Pictures is a relative path, relative to your current work directory (cwd). if you are in your home (~) it means 'go to ~/Pictures', if you are in /usr it means 'go to /usr/Pictures' etc.
in 'cd /Pictures' Pictures is an absolute path, same with 'cd ~/Pictures'. it doesn't matter which cwd you are in, you are going to /Pictures whether you are in your home, /usr, /tmp or something else.

maddjn
     
skipjack
Dedicated MacNNer
Join Date: Oct 2000
Status: Offline
Reply With Quote
May 20, 2002, 11:35 AM
 
Originally posted by benschilke:
<STRONG>
For some reason I'm unable to change directories using cd for certain directories.
I'm using: cd /Pictures
and it's reading: /Pictures: No such file or directory.

[I can move to the Documents and Library folders, however.]
</STRONG>
You were able to go to "a" Documents and "a" Library folder, but not "your" Documents and "your" Library folder.

Another answer to your question is you need, "cd Documents" and "cd Library" and "cd Pictures".

To illustrate this, open your hard drive and select Column View. You'll see all the folders at the root, "/", level. Now select "Users" and then the folder representing your home directory. You'll see all the folders in your personal directory. Note that one of the intentions of this system is that if you want to backup your personal settings, all you have to do is save the folders in the "Users" folder. Everything else should be able to be restored by reinstalling the system and software.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 02:08 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,