2

I have a folder that I want to init with git, but to do that I have to 'navigate' to that folder using cd. The problem is when I write cd Applications, that folder is empty and I cannot go into following folders.

The path I want to access is /Application/MAMP/htdocs.

I am using OS X 10.8.2.

  • 1
    You really don't want to put a folder under /Applications under git - nothing in that directory should change – user151019 Sep 28 '16 at 14:52
11

If the current directory is ~/, cd Applications goes to ~/Applications/ (which doesn't exist by default, but I guess you have an empty folder there). Try adding a slash to the start: cd /Applications/.

  • 1
    Thanks user495470! This solution works for me. But I don't really understand your answer. Can you explain it in more newb terms for my layman level? – user203637 Sep 28 '16 at 14:45
1
  1. Right click on the application, click on "Show Package Contents".
  2. once the folder is displayed, navigate it to your required folder.
  3. select that file and move it on Terminal and drop it there.

Example:

cd /Applications/IntelliJ\ IDEA.2016.2.5.app/Contents/plugins/maven/lib/maven3/bin/mvn
1

The Application folder that you want is at the Root directory. To go to this root directory, do "cd /" after that , you can do "cd Applications" to go into the applications folder.

The Applications folder you are going into is in your Home directory. To see the full location of the current directory use "pwd". This directory will be having an empty "Applications" folder - which you are going into when you typed "cd Applications"

  • 1
    Alternatively just do cd /Applications – JMY1000 Sep 13 '17 at 6:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .