2

i was hoping to utilize this trick
How to move the Downloads folder (in Mountain Lion) to another disc
to move my Downloads folder inside a directory called "disktop zi5" which is inside the directory "synktorium" in my home folder
but when i try
sudo mv ~/Downloads ~/synktorium/disktop zi5/Downloads
i get:
usage: mv [-f | -i | -n] [-v] source target
mv [-f | -i | -n] [-v] source ... directory
what am i doing wrong??

  • Why not just change the preference in Safari as to where to save downloaded files? – user151019 Mar 12 '13 at 11:15
4

The shell in Terminal doesn't like white space in file names. That's what resulted in the error message. You need to use quotes to tell the shell that the second path is a single parameter, try

sudo mv ~/Downloads ~/synktorium/"disktop zi5"/

Alternatively, you could escape the single space before zi5

sudo mv ~/Downloads ~/synktorium/disktop\ zi5/

This is what OS X and Finder would do if you dragged the folder into terminal but it's less clear to someone than using " to prevent mv from seeing three arguments instead of two (a source and destination).

  • thanks! this is the result<br> `mv: rename /Users/jk/Downloads to ~/synktorium/disktop zi5/: No such file or directory' – johannes Mar 12 '13 at 10:51
  • My bad, sorry. Just use @bmike's version or my update to the initial command – nohillside Mar 12 '13 at 10:53
  • Escaping spaces (and other characters) is such a pain. Especially when you start using shell variables and non simple ascii character sets... – bmike Mar 12 '13 at 11:05
  • I would have bet a lot that ~ gets expanded inside double quotes. oh well. – nohillside Mar 12 '13 at 11:30
  • Incidentally, when I did this, I then placed a symbolic link to the new location back as ~/Downloads. This makes the change transparent to all my apps and I don't have to change preferences all over. – Andrew Lazarus Mar 12 '13 at 18:03

You must log in to answer this question.

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