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

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 5, 2012, 06:00 PM   #1
rocknblogger
macrumors 68000
 
rocknblogger's Avatar
 
Join Date: Apr 2011
Location: New Jersey
Send a message via Skype™ to rocknblogger
How Do I Create a Sym Link

I installed a hard drive in lieu of the super drive and I want to move my Pictures, Documents, Downloads, Music and Movies folders to that drive.

And I want to be able to click the corresponding folder in the Finder sidebar to navigate to each of this folders.

I've searched Google but haven't been able to find anything that's easy to understand.

Do you know of a tutorial on how to do this that's written in plain English and easy to follow?

Thanks in advance!!
__________________
Don't be stupid.
rocknblogger is online now   0 Reply With Quote
Old Jan 5, 2012, 06:50 PM   #2
linuxcooldude
macrumors 68000
 
Join Date: Mar 2010
Quote:
Originally Posted by rocknblogger View Post
I installed a hard drive in lieu of the super drive and I want to move my Pictures, Documents, Downloads, Music and Movies folders to that drive.

And I want to be able to click the corresponding folder in the Finder sidebar to navigate to each of this folders.

I've searched Google but haven't been able to find anything that's easy to understand.

Do you know of a tutorial on how to do this that's written in plain English and easy to follow?

Thanks in advance!!
If you use iTunes for your music, I know you can tell iTunes where your music is located in the advanced tab in preferences.
linuxcooldude is offline   0 Reply With Quote
Old Jan 5, 2012, 08:27 PM   #3
tyche
macrumors regular
 
Join Date: Jul 2010
Well you can just drag the directories on your external drive and put them in your Finder favorites .

To do a sym link the way I think you are talking about. Example your external drive is called '2tb'

open terminal and cd to the directory you want the link made

ln -s /Volumes/2tb/music music

This will create a link called 'music' in this directory that is pointing to the external disk.
tyche is offline   0 Reply With Quote
Old Jan 5, 2012, 08:31 PM   #4
mobilehaathi
macrumors 601
 
mobilehaathi's Avatar
 
Join Date: Aug 2008
Location: Bay Area, CA
Someone correct me if I'm wrong, but I thought Finder aliases were just symlinks. In which case, you could just right click, create an alias, rename it, and move it into place.
__________________
The true way is along a rope that is not spanned high in the air, but only just above the ground. It seems intended more to cause stumbling than to be walked along.
mobilehaathi is offline   0 Reply With Quote
Old Jan 5, 2012, 08:33 PM   #5
Intell
macrumors P6
 
Intell's Avatar
 
Join Date: Jan 2010
Location: Inside
Quote:
Originally Posted by mobilehaathi View Post
Someone correct me if I'm wrong, but I thought Finder aliases were just symlinks. In which case, you could just right click, create an alias, rename it, and move it into place.
Finder aliases are soft symlinks. Some programs do not or cannot follow them. Symlinks created with the ln command are hard symlinks and are fully able to present themselves as folders or files to everything that requests them.
__________________
Last edited by Intell; Yesterday at 3:16 AM.
Intell is offline   1 Reply With Quote
Old Jan 5, 2012, 08:45 PM   #6
thundersteele
macrumors 68030
 
Join Date: Oct 2011
Quote:
Originally Posted by Intell View Post
Finder aliases are soft symlinks. Some programs do not or cannot follow them. Symlinks created with the ln command are hard symlinks and are fully able to present themselves as folders or files to everything that requests them.
Usually also in the command line one creates soft links, via "ln -s", as mentioned above.

From wikipedia:
Quote:
To prevent endless recursion, most modern operating systems don't allow hard links on directories. In addition, hard links on directories would lead to inconsistency on parent directory entries. A notable exception to this is Mac OS X v10.5 (Leopard) and newer, which use hard links on directories for the Time Machine backup mechanism only. Symbolic links and NTFS junction points are generally used instead for this purpose.
Hard links can only be created to files on the same volume. If a link to a file on a different volume is needed, it may be created with a symbolic link.
The maximum number of hard links to a single file is limited by the size of the reference counter: with NTFS this is limited to 1023 because a 10 bit field is used for this purpose. On Unix-like systems the counter is usually machine-word-sized (32 or 64-bit: 4294967295 or 18446744073709551615 links, respectively).
thundersteele is offline   1 Reply With Quote
Old Jan 5, 2012, 08:59 PM   #7
mobilehaathi
macrumors 601
 
mobilehaathi's Avatar
 
Join Date: Aug 2008
Location: Bay Area, CA
Quote:
Originally Posted by Intell View Post
Finder aliases are soft symlinks. Some programs do not or cannot follow them. Symlinks created with the ln command are hard symlinks and are fully able to present themselves as folders or files to everything that requests them.
Right, I meant soft symlinks. Does the OP need a hard link? If all he wants to do is be able to navigate through the Finder...

I guess if he wants certain programs to be able to follow those links then hard is what he wants, and then he'd want to drop the '-s' flag from the suggested command above.
__________________
The true way is along a rope that is not spanned high in the air, but only just above the ground. It seems intended more to cause stumbling than to be walked along.
mobilehaathi is offline   0 Reply With Quote
Old Jan 5, 2012, 09:01 PM   #8
Intell
macrumors P6
 
Intell's Avatar
 
Join Date: Jan 2010
Location: Inside
Aliases are not quite symlinks. The ln -s command's soft symlinks are the correct solution to the OP's question, where an alias could cause problems with some programs.
__________________
Last edited by Intell; Yesterday at 3:16 AM.
Intell is offline   0 Reply With Quote
Old Jan 5, 2012, 09:04 PM   #9
mobilehaathi
macrumors 601
 
mobilehaathi's Avatar
 
Join Date: Aug 2008
Location: Bay Area, CA
Quote:
Originally Posted by Intell View Post
Aliases are not quite symlinks. The ln -s command's soft symlinks are the correct solution to the OP's question, where an alias could cause problems with some programs.
Ahh, ok i thought an alias was exactly a symlink as created by ln -s. I learned something new today!
__________________
The true way is along a rope that is not spanned high in the air, but only just above the ground. It seems intended more to cause stumbling than to be walked along.
mobilehaathi is offline   0 Reply With Quote
Old Jan 5, 2012, 09:14 PM   #10
rocknblogger
Thread Starter
macrumors 68000
 
rocknblogger's Avatar
 
Join Date: Apr 2011
Location: New Jersey
Send a message via Skype™ to rocknblogger
Quote:
Originally Posted by tyche View Post
Well you can just drag the directories on your external drive and put them in your Finder favorites .

To do a sym link the way I think you are talking about. Example your external drive is called '2tb'

open terminal and cd to the directory you want the link made

ln -s /Volumes/2tb/music music

This will create a link called 'music' in this directory that is pointing to the external disk.
EDIT: Okay I'm not sure what this did. My goal is to be able to click on the folder icons in the sidebar of Finder and take me to the chosen folder's contents. So if I click the Music folder it takes me to the music folder on the 500GB drive.

Currently Music is stored in the default Music folder but I have a 240GB SSD and I want to move it to the 500GB drive but still have Lion understand that this is the default Music folder.

Same for all the other file folders in the home directory. I hope I made that clearer.
Sorry I can't multi-quote but thanks to everyone.

With this method do I have to create the directories I want and then run that command or by running that command Lion will create the directories I want?

I also remember reading somewhere that it's possible to set up two drives, an SSD and a spin drive, in such a way that Lion will show only a single primary drive and will automatically move files to the bigger drive as needed.

I'm not talking about RAID, I know what RAID is and what it does. Does this sound familiar to anyone?

I wish I had bookmarked that page
__________________
Don't be stupid.

Last edited by rocknblogger; Jan 5, 2012 at 11:45 PM.
rocknblogger is online now   0 Reply With Quote
Old Jan 6, 2012, 05:27 AM   #11
theSeb
macrumors 603
 
Join Date: Aug 2010
Location: Poole, England
Quote:
Originally Posted by Intell View Post
Finder aliases are soft symlinks. Some programs do not or cannot follow them. Symlinks created with the ln command are hard symlinks and are fully able to present themselves as folders or files to everything that requests them.
Correct, except that the "everything" bit. Unfortunately iTunes is not able to fully follow them.

I've played with the idea of splitting up my iTunes library using symbolic links. I wanted the media info (stuff like album artwork), Books and Mobile Applications to remain on the SSD and then move the individual folders like Music, Movies, iTunesU and TV Shows to the second HDD.

This works for playback, but it goes wonky if you download extra stuff. Basically iTunes won't follow the symlink if you download a movie and the file will not be moved into the correct directory. It will remain in the downloads folder.

Also if you tick "Keep media organised" and then add an item to the library manually, it also won't follow the symlink and stick that item into the correct directory. For some strange reason iTunes uses an odd method in the code to do this that is not compatible with symbolic links. There are plenty of discussions on the net about this, which I only found after trying to do this.

In the end I moved the entire library from the iTunes level to the second HDD and created a symbolic link called iTunes in the home/Music folder.

----------

Quote:
Originally Posted by mobilehaathi View Post
Ahh, ok i thought an alias was exactly a symlink as created by ln -s. I learned something new today!
Apart from what was already mentioned, an alias is a lot larger ( a couple of megabytes vs a couple of kilobytes) and also an alias keeps track of what it is pointing to. So if you're pointing to a file and then you move it or rename it, the alias will continue to work. The symbolic link will no longer work and will need to be recreated to point at the new location.

OP: copy the music folder to your other HDD. Create a symbolic link to it in your home drive called Music. Your sidebar buttons will continue to work because they are actually aliases.

For example: if I move my Documents folder to somewhere else or rename it, the sidebar buttons will still work. But you still need to create a symbolic link to Documents in your home folder to make sure all other applications work as expected. I hope that makes sense.
__________________
What is Other on my HDD?
Throttling, overheating and Geekbench

Last edited by theSeb; Jan 6, 2012 at 07:59 AM.
theSeb is offline   1 Reply With Quote
Old Jan 6, 2012, 10:09 AM   #12
rocknblogger
Thread Starter
macrumors 68000
 
rocknblogger's Avatar
 
Join Date: Apr 2011
Location: New Jersey
Send a message via Skype™ to rocknblogger
Quote:
Originally Posted by theSeb View Post

OP: copy the music folder to your other HDD. Create a symbolic link to it in your home drive called Music. Your sidebar buttons will continue to work because they are actually aliases.

For example: if I move my Documents folder to somewhere else or rename it, the sidebar buttons will still work. But you still need to create a symbolic link to Documents in your home folder to make sure all other applications work as expected. I hope that makes sense.
Can you give me a step by step because what I'm doing is not working. I did what tyche suggested and it doesn't work for me. I must be doing something wrong.
__________________
Don't be stupid.
rocknblogger is online now   0 Reply With Quote
Old Jan 6, 2012, 12:20 PM   #13
theSeb
macrumors 603
 
Join Date: Aug 2010
Location: Poole, England
I'll check it out on my mini this weekend and post instructions.
__________________
What is Other on my HDD?
Throttling, overheating and Geekbench
theSeb is offline   0 Reply With Quote
Old Jan 6, 2012, 12:26 PM   #14
ppilone
macrumors 6502
 
Join Date: Jan 2008
Do you want to move your entire home directory onto the HDD? I did the same thing when I installed an SSD in place of my superdrive - wrote up instructions here:

http://www.element84.com/replacing-a...th-an-ssd.html

You'll want to scroll down to the "Moving data around" section.

Disclosure: Link to my company's blog - don't want to seem like a spammer.
__________________
iHomework
NoteReel
MacBook Pro
iPhone
ppilone is offline   0 Reply With Quote
Old Jan 6, 2012, 02:20 PM   #15
rocknblogger
Thread Starter
macrumors 68000
 
rocknblogger's Avatar
 
Join Date: Apr 2011
Location: New Jersey
Send a message via Skype™ to rocknblogger
Quote:
Originally Posted by ppilone View Post
Do you want to move your entire home directory onto the HDD? I did the same thing when I installed an SSD in place of my superdrive - wrote up instructions here:

http://www.element84.com/replacing-a...th-an-ssd.html

You'll want to scroll down to the "Moving data around" section.

Disclosure: Link to my company's blog - don't want to seem like a spammer.
That seems pretty straightforward. Move Home folder to hard drive, change user's path to point to that hard drive.

This means that the Library directory will also be moved. Wouldn't having the Library on the hard drive impact speed when it comes to certain apps?
__________________
Don't be stupid.
rocknblogger is online now   0 Reply With Quote
Old Jan 6, 2012, 03:19 PM   #16
ppilone
macrumors 6502
 
Join Date: Jan 2008
Quote:
Originally Posted by rocknblogger View Post
That seems pretty straightforward. Move Home folder to hard drive, change user's path to point to that hard drive.

This means that the Library directory will also be moved. Wouldn't having the Library on the hard drive impact speed when it comes to certain apps?
Sure, any data saved to Application Support (as an example) would be read off the HDD. I installed a relatively small SSD so all of my data stays on the HDD.

What I suggested does move your entire home folder so it may not be what you need.
__________________
iHomework
NoteReel
MacBook Pro
iPhone
ppilone is offline   0 Reply With Quote
Old Jan 6, 2012, 04:06 PM   #17
rocknblogger
Thread Starter
macrumors 68000
 
rocknblogger's Avatar
 
Join Date: Apr 2011
Location: New Jersey
Send a message via Skype™ to rocknblogger
Quote:
Originally Posted by ppilone View Post
Sure, any data saved to Application Support (as an example) would be read off the HDD. I installed a relatively small SSD so all of my data stays on the HDD.

What I suggested does move your entire home folder so it may not be what you need.
It's almost what I want. I want to get the most of my SSD so I would rather just move the personal file folders.
__________________
Don't be stupid.
rocknblogger is online now   0 Reply With Quote
Old Jan 19, 2012, 01:52 PM   #18
smurray
macrumors member
 
Join Date: May 2008
Quote:
Originally Posted by rocknblogger View Post
It's almost what I want. I want to get the most of my SSD so I would rather just move the personal file folders.
I'm in the same situation as you. I want to store my media files/folders on an external drive, but am concerned about the Library folder residing there as well. I'm more concerned about what would happen if I were to ever reinstall Lion, since after I moved the home folder again there would be my old Library folder with all the settings from my previous install.
smurray is offline   0 Reply With Quote
Old Jan 20, 2012, 02:47 AM   #19
systole
macrumors member
 
Join Date: Mar 2011
Location: Minnesnowta
Quote:
Originally Posted by thundersteele View Post
Usually also in the command line one creates soft links, via "ln -s", as mentioned above.
Thanks for clarifying. As I continue to dive into the terminal and linux/unix, it's amazing how easy it is to confuse the different link types
__________________
2011 17" MBP 2.3 i7, 8 GB, 48GB SSD, 500GB 7200RPM HDD, iPhone5 Unlimited VZW
2011 13" MBA 1.7 i5, 4 GB RAM, SM128 SSD, and a Cisco CCNP lab. Gotta love OSPFv3...
systole is offline   0 Reply With Quote
Old Mar 27, 2012, 10:35 PM   #20
diamond3
macrumors 6502a
 
Join Date: Oct 2005
Has anyone tried this? I'm currently in the process of figuring this out but am not sure.

I've got the SSD and a HDD in my mbp. I tried to create a sym link with the downloads folder first. Here are my steps

Copy Downloads folder from SSD to HDD
Does file structure matter? ex. On SSD: SSD/users/username/Downloads/ to just /HDD/Downloads?
After that, I opened terminal and pasted
Code:
sudo rm -rf ~/Downloads/
entered password, which deleted folder on SSD

Pasted the following into terminal
Code:
ln -s /Volumes/HDD/Downloads/ ~/Downloads
I lose the downloads folder in the sidebar and my folder on my HDD doesn't have the normal download folder icon. This does create a symlink though in my username folder on the SSD so I thought it would work.

So then I tested it by downloading a file from safari, but it defaults now to the desktop. I know I can change the path location in safari, but I thought that was the whole point of creating a sym link?

Any help would be appreciated.
diamond3 is offline   1 Reply With Quote
Old Sep 14, 2012, 01:24 PM   #21
rivervillager
macrumors newbie
 
Join Date: Sep 2012
SSD+HDD and creation of symlinks

Hi diamond3 - did you find a solution? I am having same problem: symlink works when I click on downloads folder, but when I download something it is directed to my desktop. I only want to transfer downloads, images, documents and other potentially large but infrequently accessed files to the HDD, which was placed in the opti-bay. I did a complete new install, and am running Mountain Lion on a pre-unibody 2008 MBP.
rivervillager is offline   0 Reply With Quote
Old Oct 16, 2012, 04:47 AM   #22
CASLondon
macrumors 6502
 
Join Date: Apr 2011
Quote:
Originally Posted by rivervillager View Post
Hi diamond3 - did you find a solution? I am having same problem: symlink works when I click on downloads folder, but when I download something it is directed to my desktop. I only want to transfer downloads, images, documents and other potentially large but infrequently accessed files to the HDD, which was placed in the opti-bay. I did a complete new install, and am running Mountain Lion on a pre-unibody 2008 MBP.
I'm finding myself in the same boat, standing a little confused. I want to do the same, keep Home on the SSD but move downloads, pictures, movies, music folders to the HDD and symlinks from SSD.

Here are the references I've found

http://mattgemmell.com/2011/06/21/us...lus-hdd-setup/

I've used the symlink services download successfully, but I seem to have some permissions issues, or something. Its not as simple as it seemed. I can't delete the original special folders without a warning that OS needs them.

Now I log in as a root user and start again. I can indeed delete via terminal the original downloads folder, put a new folder called downloads on the HDD, symlink it, move that symlink to the right spot on the original folder structure under users. All looks right, but then OS X seems to recreate a new "special" downloads folder ALONGSIDE my new symlink one.

Anyone want to lay out the "For Dummies" version of moving Downloads, Pics, Etc to HDD and using symlinks?

Last edited by CASLondon; Oct 16, 2012 at 05:21 AM.
CASLondon is offline   0 Reply With Quote
Old Jan 11, 2013, 10:29 AM   #23
pukrnukr
macrumors member
 
Join Date: Dec 2010
Location: Roc
Send a message via AIM to pukrnukr
Quote:
Originally Posted by CASLondon View Post
I've used the symlink services download successfully, but I seem to have some permissions issues, or something. Its not as simple as it seemed. I can't delete the original special folders without a warning that OS needs them.

Now I log in as a root user and start again. I can indeed delete via terminal the original downloads folder, put a new folder called downloads on the HDD, symlink it, move that symlink to the right spot on the original folder structure under users. All looks right, but then OS X seems to recreate a new "special" downloads folder ALONGSIDE my new symlink one.

Anyone want to lay out the "For Dummies" version of moving Downloads, Pics, Etc to HDD and using symlinks?
I know this is old but did you ever figure this out? I still can't delete the original downloads folder even though I'm logged in as the admin and root user.
pukrnukr is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > Mac OS X 10.7 Lion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Anyone know if it is possible to create a symbolic link to a folder within a package? pruppert OS X 10.8 Mountain Lion 2 Apr 27, 2013 04:10 PM
'Automatic Link' App and Bluetooth Adapter Create Connected Car for Diagnostics and Safety MacRumors iOS Blog Discussion 48 Mar 14, 2013 09:59 AM

Forum Jump

All times are GMT -5. The time now is 09:47 PM.

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

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