Move special OS X user folders to external drive

I recently upgraded by MacBook Pro to having two hard drives (an SSD for the OS, and the platter drive for media). I wanted to put the “special” user folders onto the media drive, but still have the main user folder on the SSD. The reason it is better to do it this way is that caches and profile information, which is often read by the OS / apps, are still on the SSD, but then the larger files which don’t require speed are on the media drive.

To do this, you need to delete the folders from your home directory, and soft-link the directories to the external drive.

Also, make sure you transfer the special folder icon from the old folder to the new folder, by clicking on the old folder, pressing Cmd + I, selecting the icon in the dialog, and pressing Cmd + C. Then, select the new folder, press Cmd + I again, select the icon, and press Cmd + V.

So, the first step is to copy all of, say, your Pictures directory onto the external drive. Then you’ll want to use the command line to delete the old folder and link it:

sudo rm -rf ~/Documents && ln -s "/Volumes/Media/Documents/" ~/Documents
sudo rm -rf ~/Pictures && ln -s "/Volumes/Media/Pictures/" ~/Pictures
sudo rm -rf ~/Movies && ln -s "/Volumes/Media/Movies/" ~/Movies

Repeat this once for each folder you want to move (making sure you first copied the content over).

Unfortunately, the grey sidebar icons are no longer pretty and folder specific, just generic grey (even if you fixed the normal icon as specified above). Also, all of the folders will have shortcut symbols on them. I suppose you can’t have your cake and eat it too.

 

11 Responses to “Move special OS X user folders to external drive”

  1. Why not just use the user/account feature in OSX system preferences to move the home folder to another drive? All the system files stay on the SSD while all the media files (Pictures/Movies/Documents/Music/Downloads) are moved to the HDD, or wherever you want to put them.

    Eat away!

    Reply
    • While that method would be a LOT easier, you don’t get the benefit of having the users profile and cached data on the SSD. If it wasn’t for this caveat, I would have definitely stuck the whole user directory onto the second drive, it would alleviate some of the issues mentioned int he post.

      Reply
  2. Trond Larsen

    I did all you described above but the sudo command did not work.
    “Last login: Sat Sep 29 11:15:18 on ttys000
    TRLs-MacBook:~ TRL$ sudo rm ~/Movies && ln -s “/Volumes/Media/Movies/” ~/Movies
    rm: /Users/TRL/Movies: is a directory
    TRLs-MacBook:~ TRL$”

    Reply
  3. Great article. This worked for me OSX 10.7.5.

    Thanks

    Reply
  4. I tried this and everything worked well until i tried “Save to PDF” from the print option, I believe it is having problems seeing my Documents folder?

    Reply
    • I’m not sure what you’re talking about as far as saving a PDF.

      If you are able to see your ~/Documents directory from within Finder, it should have been mounted just fine.

      Reply
  5. Bill Paradis

    Message Body:
    Hi Thomas,
    I hope you have time to help me out in regards to your article “Move special OS X user folders to external drive.”

    I followed you instructions to the “T”. When in Finder for SSD and I click on a folder/directory folder, that I have sudo removed and link I get the message “The operation can’t be completed because the original item for “filename” can’t be found.”

    Instead should it not point to the files in the same name folder on the HDD?

    Some things are working and others aren’t after following the article. Please let me know if you need more info, or anything else for that matter, to help you help me.

    Thanks Bill

    Reply
  6. Same problem as Bill… using ML I get the message “The operation can’t be completed because the original item for “filename” can’t be found.” anyone worked this out?

    Reply
  7. Hi,
    I had moved my folders to my 2nd HDD as you have described. Now I want to move them back as I move entire home directory to the 2nd HDD. Do you have any idea how I can recover these commands?
    Will I get the original sidebar icons back?

    Reply
    • You should be able to rm the link files, and mv the originals back. Something like this:

      sudo rm ~/Documents && mv /Volumes/Media/Documents ~/Documents

      Reply

Comment

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>