How to use Terminal to navigate into a desktop shortcut or folder in applications?
23,339
In order to get to the Main Mac folder, you can do cd /
Author by
MKM
Updated on September 18, 2022Comments
-
MKM almost 2 years
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:
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)
-
Ignacio Vazquez-Abrams about 11 years
file localhost
says...? -
MKM about 11 yearswhen I type that in, it displays 'data'
-
Ignacio Vazquez-Abrams about 11 yearsI would remove the shortcut and create a symlink instead.
-
slhck about 11 yearsIf you want to keep the alias and follow that, see: OS X terminal command to resolve path of an alias
-
-
MKM about 11 yearsJust tried that again, and can't CD into an alias :(
-
MKM about 11 yearsThanks! I can now cd into my Applications > MAMP folder :)
-
francesco about 11 yearsYeah, sorry, my answer was wrong, I revised it.