I have very limited knowledge of bash, and I haven't been able to figure out what I'm doing wrong.

I'm trying to follow the steps in this blog post: Using Mendeley and Dropbox to sync your pdf library across computers

However, when I run the terminal commands I get the following error:

~/Library/Application\ Support>cp -r Mendeley\ Desktop/ ~/Dropbox/Mendeley/db/
-bash: /Users/XXXXXXXX/Library/Application Support: is a directory

Everything I've read online seems to suggest that this command is correct.

  • The article you linked to really had nothing to do with bash scripting per se, just running some individual command line programs in a Terminal and in this case is not the same as bash scripting. That said however, the article is IMO poorly written! The command prompt shown is atypical of the default prompt in OS X, which normally has the pattern as defined in the environment as PS1='\h:\W \u\$ '. Where \h is the hostname, up to the first ‘.’, a : as a separator, \W the basename of $PWD, with $HOME abbreviated with a tilde, a space as a separator, (Continued in next...) Feb 10, 2016 at 5:29
  • \u the username of the current user and \$ if the effective uid is 0, #, otherwise $ followed by another space. So the prompt with the cp command should have looked like, e.g. mac1:Application Support johndoe$ cp -r Mendeley\ Desktop/ ~/Dropbox/Mendeley/db/ after having been told first to actually cd to ~/Library/Application\ Support, which wasn't told to be done. Just shown a extremely poor representation of what the command prompt would look like and never would have looked like it in the first place! So it's not at all your fault there was confusion. Feb 10, 2016 at 5:29

1 Answer 1


The author of the linked article probably had a modified bash profile (like explained by the user user3439894 in the comments to your question) or had problems to copy and paste the commands.

Use the following instead:

cd ~/Library/Application\ Support
cp -r Mendeley\ Desktop/ ~/Dropbox/Mendeley/db/
mv Mendeley\ Desktop/ _backup_Mendeley_Desktop/
ln -s ~/Dropbox/Mendeley/db/Mendeley\ Desktop .

Please don't forget to include the dot . at the end of the last command. The last line means: create a soft link of the folder "~/Dropbox/Mendeley/db/Mendeley Desktop" at your current working directory (which is "~/Library/Application Support").


  1. cd ~/Library/Application\ Support: change the working directory to "/Users/YourUserFolder/Library/Application Support".
  2. cp -r Mendeley\ Desktop/ ~/Dropbox/Mendeley/db/: copy the folder (including the content) "Mendeley Desktop" into the folder "~/Dropbox/Mendeley/db/"
  3. mv Mendeley\ Desktop/ _backup_Mendeley_Desktop/: rename (move/backup) the folder "Mendeley Desktop" to "_backup_Mendeley_Desktop".
  4. ln -s ~/Dropbox/Mendeley/db/Mendeley\ Desktop .: create a soft link of the folder "~/Dropbox/Mendeley/db/Mendeley Desktop" at your current working directory.
  • 1
    Regardless of whether or not the author of the linked article has a modified bash profile, where the article lacked is it didn't contain any real direction for the subject matter surrounding the use of the Terminal. Suffice it to say the average computer user does not often use the command line and is typically intimidated to begin with when having to do so, even with clear directions. Which IMO the article lacked in this area. (Continued in next comment...) Feb 10, 2016 at 16:48
  • 1
    Instead of showing, e.g. "[mac]@mac1:~/Library/Application Support>" there should have been clear direction to cd to ~/Library/Application\ Support and then just show the individual commands without showing an atypical command prompt. If the prompt is to be shown, use what is a typical default or just use $ as common in some documentation, or don't show any at all. Personally I prefer to be told to cd ... and then just shown the actual commands to execute without showing a command prompt. The less clutter around the actual commands to execute the easier the process can be comprehended. Feb 10, 2016 at 16:48
  • I just wanted you to know that by my comments I was not suggesting that you needed to make changes to your answer or give an explanation. I was just being a critic of the IMO poorly written linked article in the OP. Your answers are typically well written and easily understood, even with the complicated subjects which this particular one is not. That said, your recent edit surely adds value for the command line neophyte. :) I'd +1 you again if I could. Feb 10, 2016 at 17:17
  • 1
    @user3439894 A lot of my answers concerning the shell lack an explanation what the commands actually do. So I took your comments as stimulus to add one. ;-)
    – klanomath
    Feb 10, 2016 at 17:22

You must log in to answer this question.

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