Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm on a Mac and watching a tutorial on setting up Git.

I'm in the terminal and currently on the Desktop. I can us ls to list all the items on my desktop, and cd into any of the folders on my Desktop, but I can't get into my localhost shortcut (which leads to the MAMP folder in applications where all my websites are).

Error message:

enter image description here

1) How do you navigate into a shortcut, or

2) How do you navigate into the Main Mac folder (I can't see or cd into it from the terminal)

share|improve this question
    
file localhost says...? –  Ignacio Vazquez-Abrams May 18 '13 at 5:54
    
when I type that in, it displays 'data' –  Leon Gaban May 18 '13 at 5:55
    
Did you mean to create it as a symlink initially? –  Ignacio Vazquez-Abrams May 18 '13 at 5:55
    
Not sure what that means, I just put a shortcut there, because I'm too scared of accidentally deleting my projects folder. So a shortcut makes it safer :) Do I need to remake the shortcut / alias? –  Leon Gaban May 18 '13 at 5:56
    
I would remove the shortcut and create a symlink instead. –  Ignacio Vazquez-Abrams May 18 '13 at 5:57
show 1 more comment

2 Answers

up vote 1 down vote accepted

In order to get to the Main Mac folder, you can do cd /

share|improve this answer
    
Thanks! I can now cd into my Applications > MAMP folder :) –  Leon Gaban May 21 '13 at 5:06
add comment

Using Terminal

ln -s /Applications/source/path /Users/name/target/path

which in your case (if I've understood correctly) should be

ln -s /Applications/MAMP ~/Desktop/localhost

which will create a symbolic link on your Desktop which will be accessible both through the finder and by entering cd localhost while in ~/Desktop.

If you only need this link for quick access via Terminal, I would recommend placing it into your home folder which would allow you to access it by entering cd localhost as soon as you open a new Terminal shell.

share|improve this answer
    
Just tried that again, and can't CD into an alias :( –  Leon Gaban May 21 '13 at 5:06
    
Yeah, sorry, my answer was wrong, I revised it. –  Francesco Zeno May 21 '13 at 8:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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