0

I am trying to make a hello world program work on my Mac. Every time I go to change a directory I get a message that says:

-bash: cd: documents No such file or directory exists.

I know the documents directory is there.

cd Documents
-bash: cd: documents: No such file or directory
  • What happens if you use ls from the root folder, can you see your target directory there? – Burgi Sep 26 '17 at 23:58
  • (Applications home Library installer.failurerequests Network libpeerconnection.log System net User Guides And Information private Users sbin Volumes sockets.log bin tmp cores usr dev var etc – Dylan Lee Sep 28 '17 at 3:32
2

You're likely not starting from the correct directory. Try cd ~/Documents or cd /Users/(Your Username here)/Documents.

Also note that, depending on formatting of the disk, your filesystem may be Case Sensitive, meaning documents and Documents are two completely different locations.

| improve this answer | |
  • -bash: syntax error near unexpected token – Dylan Lee Sep 27 '17 at 23:24
  • I keep getting that – Dylan Lee Sep 27 '17 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.