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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Remote access to view, turn on/off iSight Camera Johnny Gilligan iPhone 11 Dec 26, 2013 06:57 PM
Access to library after match using same laptop in different locations len3121 iCloud and Apple Services 12 Nov 20, 2011 04:51 AM
Lion Mail - link to folder. Tinchohs Mac OS X 10.7 Lion 0 Sep 7, 2011 05:25 PM
Growl notification when new item added to folder qom Mac Programming 1 Jan 8, 2011 12:30 PM
No Access to folders atacinus OS X 4 May 21, 2007 04:51 AM


All times are GMT -5. The time now is 09:49 AM.

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

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