Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 18, 2006, 08:59 PM   #1
chrislee8
macrumors regular
 
Join Date: Jul 2004
Location: NY, NY
Send a message via AIM to chrislee8
access to folder shortcut

I created a shortcut for a folder at my desktop, the icon has a little curve arrow on it.

in a terminal (bash), I try to do >cd myfolder, it doesn't get into the folder, what do i need to do?

thanks
chrislee8 is offline   0 Reply With Quote
Old Aug 18, 2006, 09:27 PM   #2
WildCowboy
Administrator/Editor
 
WildCowboy's Avatar
 
Join Date: Jan 2005
Okay, I'm not a Unix expert (though I should be...I use it enough). The problem you're having is that the shortcut (alias) is not an actual folder, so you can't cd into it. I'm not aware of a way to activate the alias within Terminal to take you to the desired folder...but don't quote me on that.

What you can do is create a Terminal alias and save it to your .cshrc. There's some info on how to that here.
__________________
Editor in Chief, MacRumors
WildCowboy is offline   0 Reply With Quote
Old Aug 18, 2006, 09:36 PM   #3
chrislee8
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Location: NY, NY
Send a message via AIM to chrislee8
i thought there would be a more convenient way to do that.

oh well, thanks though
chrislee8 is offline   0 Reply With Quote
Old Aug 18, 2006, 10:05 PM   #4
jsw
Moderator emeritus
 
jsw's Avatar
 
Join Date: Mar 2004
Location: Andover, MA
The Finder->File->"Make Alias" command is really GUI-only - the actual file is more or less worthless in Terminal.

However, you can make a "real" alias by opening Terminal, typing in
Code:
ln -s
(be sure there is a trailing space), then dragging the folder into Terminal, which will enter the path, so you'll have something like
Code:
ln -s /Users/me/Desktop/Stuff
There will be a trailing space. Finish it with the new location, remembering the path, so it'd end up being a command like:
Code:
ln -s /Users/me/Desktop/Stuff /Users/me/Documents/StuffAlias
Press return.

That'll do the trick; the second name is the alias - it'll be usable via Terminal as well.
__________________
You'll be the one moaning for me to give you some. - THC(taken out of context)
jsw is offline   0 Reply With Quote
Old Aug 19, 2006, 06:17 AM   #5
gnasher729
macrumors G5
 
gnasher729's Avatar
 
Join Date: Nov 2005
Quote:
Originally Posted by chrislee8
I created a shortcut for a folder at my desktop, the icon has a little curve arrow on it.

in a terminal (bash), I try to do >cd myfolder, it doesn't get into the folder, what do i need to do?

thanks
What you have created is an alias file. An alias file is just a normal file, however, instead of normal data it contains a description where another file or folder can be found. The finder and many applications will read that description and find the right file or folder doing this. Because it is nothing within the file system, alias files "work" for example if you copy everything to another disk, or rename a folder, and so on.

Another method in Unix is to create a "symbolic link". A symbolic link contains a direct connection to another file or folder. In terminal, do "man ln" to see the command that creates unix links. The finder will display unix links exactly the same as alias files. Usually, alias files are the preferred method, because they survive more user actions without problems; a symbolic link will stop working if you move or rename the folder it is pointing to.
gnasher729 is offline   0 Reply With Quote
Old Aug 19, 2006, 03:07 PM   #6
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
I hope Tiger's Finder abandons the alias and uses symbolic links instead.
kainjow is offline   0 Reply With Quote
Old Aug 21, 2006, 02:19 PM   #7
chrislee8
Thread Starter
macrumors regular
 
Join Date: Jul 2004
Location: NY, NY
Send a message via AIM to chrislee8
Quote:
Originally Posted by jsw
The Finder->File->"Make Alias" command is really GUI-only - the actual file is more or less worthless in Terminal.

However, you can make a "real" alias by opening Terminal, typing in
Code:
ln -s
(be sure there is a trailing space), then dragging the folder into Terminal, which will enter the path, so you'll have something like
Code:
ln -s /Users/me/Desktop/Stuff
There will be a trailing space. Finish it with the new location, remembering the path, so it'd end up being a command like:
Code:
ln -s /Users/me/Desktop/Stuff /Users/me/Documents/StuffAlias
Press return.

That'll do the trick; the second name is the alias - it'll be usable via Terminal as well.
I sorta remember that when i was playing with linux. thanks
chrislee8 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Tag Folder In Dock / Shortcut? FriDay85 OS X Mavericks (10.9) 0 Oct 26, 2013 09:59 AM
Dragging Folder to Desktop Makes Shortcut (Alias) Instead of Moving iSaxon OS X Mavericks (10.9) 2 Sep 11, 2013 10:34 PM
Folder access... furycd001 Mac Basics and Help 8 Feb 7, 2013 02:26 AM
Eclipse Shortcut in Applications Folder? A4orce84 OS X 10.8 Mountain Lion 2 Nov 29, 2012 09:26 PM
Is there a shortcut/utility to access menubar? eroxx Mac Applications and Mac App Store 6 Jul 22, 2012 10:02 AM

Forum Jump

All times are GMT -5. The time now is 01:22 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC