Terminal Syntax - Specifying a file folder with a space

Discussion in 'Mac Basics and Help' started by infinity4ever, Jan 31, 2006.

  1. infinity4ever macrumors newbie

    Joined:
    Jan 21, 2006
    Location:
    San Diego, CA
    #1
    Ok, I'm trying to reassign my iPhoto default folder to my external drive. I nice person on here gave me directions last week and I just got around to trying them out.

    The syntax that I was given was
    ln -s /Volumes/External/iPhoto\Library ~/Pictures/iPhoto\Library

    where External is my external drive name. Ok I tried this and it says No such file or directory. I used an ls command to verify my path name and files. It seems not to like the \ it ignores it and I get ~/Pictures/iPhotoLibrary as part of the error message.

    I think this should be easy, but my UNIX skills are weak :) Help Please :)
     
  2. masterapple04 macrumors regular

    Joined:
    May 26, 2004
    Location:
    Massachusetts, USA
    #2
    You need a space after the \. So:

    ln -s /Volumes/External/iPhoto\ Library ~/Pictures/iPhoto\ Library
     
  3. infinity4ever thread starter macrumors newbie

    Joined:
    Jan 21, 2006
    Location:
    San Diego, CA
    #3
    Thanks, now I'm a bit confused. I was told to move the second reference, so of course it isn't finding it. Can you tell me in english exactly what this statement is doing?

    Thanks!
     
  4. infinity4ever thread starter macrumors newbie

    Joined:
    Jan 21, 2006
    Location:
    San Diego, CA
    #4
    Ok I finally got it to work. I think basically what it is doing is telling iPhoto that the default library is the first location not the second location.:)
     
  5. masterapple04 macrumors regular

    Joined:
    May 26, 2004
    Location:
    Massachusetts, USA
    #5
    On second glance, you've got the two folders reversed. Instead of:

    ln -s /Volumes/External/iPhoto\ Library ~/Pictures/iPhoto\ Library

    you SHOULD have:

    ln -s ~/Pictures/iPhoto\ Library /Volumes/External/iPhoto\ Library


    Basically, that whole line is making a symbolic link between your original iPhoto folder and the one on your external drive. A sym link basically treats the link like the real thing, but files go to the linked folder.

    Also, if you ever need to know what a command in the Terminal does, just type "man" and then the command. So in this case, it would be:

    man ln

    This opens a manual page for the command where you can see its various switches and properties.
     
  6. infinity4ever thread starter macrumors newbie

    Joined:
    Jan 21, 2006
    Location:
    San Diego, CA
    #6
    Thanks!! That makes sense. I used so many different os's over the years that they all seem to blend together. Thanks for the man command. I'm sure that will come in handy :)
     

Share This Page