Creating Symlinks with SSD

Discussion in 'MacBook Pro' started by mrrippey, Oct 3, 2009.

  1. mrrippey macrumors regular

    Joined:
    Apr 7, 2009
    #1
    Just installed Sl on my freshly new Intel X25 G2. My internal drive has all of my data, pictures and music. I wanted to create a symlink from my new music, photo, document and download directories to point to the HDD and not the SSD.

    Would I do this:

    ln -s /Users/me/Documents /HDD/Users/me/Documents for the Documents dir
    and so forth?

    What I want to prevent is the obvious, crazy writes and utilize the space on the HDD which has loads while my SSD only has 80GB.

    Thanks!
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    That link is the wrong way round: the first path is the path you are linking to, the second path is the link path itself (if not supplied the last component of the target path will be used to name the link in the cwd).
     
  3. mrrippey thread starter macrumors regular

    Joined:
    Apr 7, 2009
    #3
    gracias

    going to start moving my stuff around
     
  4. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #4
    When ever you're not sure about a terminal command type man <command> that will give you the man pages
     
  5. mrrippey thread starter macrumors regular

    Joined:
    Apr 7, 2009
    #5
    hmmm...

    I did read the man pages and I think I understand the usage.

    I tried to do it but it doesn't seem to do what I expected it to do. this is the command I entered:

    ln -s /Volumes/AppleHDD/Users/me/Documents /Users/me/Documents

    and what I expect is when I click on the Documents folder on the left, it goes to the Documents folder on the HDD and not the SSD.

    Am I assuming this is how symlinks work?:confused:
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    I'm not sure you can create a symlink to a path that already exists...
     
  7. tofagerl macrumors 6502a

    tofagerl

    Joined:
    May 16, 2006
    #7
    Robbi's right. You have to delete the Documents folder first, which requires sudo.
    Also, never include the traling slash on folders when you're using ln, that just creates weirdness and (hopefully) errors.
     
  8. mrrippey thread starter macrumors regular

    Joined:
    Apr 7, 2009
    #8
    thanks for the feedback.

    So I would need to delete (for my purposes anyway)

    /Users/Me/Documents
    /Users/Me/Downloads
    /Users/Me/Music
    /Users/Me/Pictures

    As those come default in my profile and recreate them with the symlink command?

    tofagerl, in regards to trailing slashes on folders, are you saying I should NOT use

    /Users/Me/Downloads/ and instead use /Users/Me/Downloads?
     
  9. tofagerl macrumors 6502a

    tofagerl

    Joined:
    May 16, 2006
    #9
    That's right. Oh, and make sure those folders are actually empty before deleting ;p
     
  10. mrrippey thread starter macrumors regular

    Joined:
    Apr 7, 2009
    #10
    they are empty at the moment since it is still a fresh SL install, just want to get the files all in the right place before I install apps.

    This is what I dont get, if I delete /Users/Me/Documents directory (this is on the SSD and I want it to point to the HDD) then does

    ln -s /Volumes/AppleHDD/Users/Me/Documents /Users/Me/Documents

    actually create the /Users/Me/Documents directory (or create the symlink to the HDD directory)?

    Never used symlinks before but seems very useful, just want to understand it better, thanks for the help gang.
     
  11. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #11
    It creates a symlink. Not a directory.
     

Share This Page