0

Just finished re-installing macOS Sierra on my MBP and am trying to move the ~/Downloads and other folders to a different drive so they end up in /Volumes/Data/ instead.

I created a /Volumes/Data/Downloads folder and symlinked from one to the other like so:

sudo ln -s /Volumes/Data/Downloads Downloads

This works more or less, but it creates another Downloads folder inside the /Volumes/Data/Downloads folder so the full path would be

/Volumes/Data/Downloads/Downloads

Any Idea what I'm doing wrong? So it looks like this: Downloads inside Downloads

  • What directory (folder) are you in when you run the command? – John N Dec 5 '16 at 16:41
  • I'm in my homefolder As in /User/Username – Ben La Paz Dec 5 '16 at 17:04
  • OK, thanks. Did ~/Downloads exist before you made the symlink? (I can recreate this, but only when I first create a source directory with the same name as the symlink). – John N Dec 5 '16 at 17:19
  • Yes, ~/Downloads is the default directory inside the user directory, just as ~/Documents or ~/Music - it's those default directories that I want in on a different drive. I don't want to move the whole User folder as I want to keep the ~/Library in it's original place. (That is on the SSD that houses the OS too. The symlinked folders on /Data are on an HDD) – Ben La Paz Dec 5 '16 at 17:40
1

This occurred because you already had something in your home directory called "Downloads" - the ln command is smart enough not to write over it, so instead created the symlink within it.

If you're starting from scratch you can mv ~/Downloads ~/Volumes/Data/; if you've already successfully copied your Downloads directory you can simply delete the old one in your home directory: rm -Rf ~/Downloads.

After that your original ln command should work. You shouldn't need to prefix it with sudo:

ln -s /Volumes/Data/Downloads ~/Downloads

Or, as fd0 suggested, instead of using rm you could use ln -s -f option to unlink the directory. Thus creating the desired results:

ln -s -f /Volumes/Data/Downloads ~/Downloads
  • Thanks you @John-N this did the trick. I read about this in so many places, but it seems none mentioned to remove the original folder – Ben La Paz Dec 5 '16 at 18:21
  • Instead of using rm, you could use ln 's -f option to unlink the directory. Thus creating the desired results. – fd0 Dec 5 '16 at 20:55
-1

Try writing full path instead, I think what you wanted to write is:

sudo ln -s /Volumes/Data/Downloads ~/Downloads
  • Same thing happens – Ben La Paz Dec 5 '16 at 17:09
  • Can you run 'ls -l' from terminal from /Volumes/Data/Downloads and show the result? – Asafm Dec 5 '16 at 17:17
  • Also try sudo ln -s /Volumes/Data/Downloads /Users/{userName}/Downloads and make sure – Asafm Dec 5 '16 at 17:18
  • Also try sudo ln -s /Volumes/Data/Downloads /Users/{userName}/Downloads and make sure the folder '/Users/{userName}/Downloads' does not exists – Asafm Dec 5 '16 at 17:19
  • ls -l gives the following: $ ls -l . total 0 . drwxr-xr-x 265 username admin 9010 Nov 21 12:00 Documents . drwxr-xr-x 2 username admin 68 Dec 5 12:56 Downloads . drwxr-xr-x 243 username admin 8262 Dec 5 12:58 DownloadsOLD . drwxr-xr-x 28 username admin 952 Nov 20 18:48 Movies . drwxr-xr-x 9 username admin 306 Jul 11 2014 Music . Where Downloads is the folder I am trying to link to. Should I remove the default /Users/UserName/Downloads before trying? – Ben La Paz Dec 5 '16 at 17:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .