Search code examples
macosshellterminalmacos-high-sierra

Can't Copy folder to specific location using terminal - Mac


I could not find a usable solution to this seemingly simple problem, despite my best efforts.

I'm using MacOS High Sierra 10.13.6

I have a folder I want to copy with the following location: /Users/ep9k/Desktop/Key-LogEcovaluator/whereami

I want to copy it to this directory using the terminal: /Users/ep9k/Library/Application/Support/QGIS/QGIS3/profiles/default/python/plugins

I tried the following commands in the terminal. Notice I am in the 'whereami' folder when doing this:

whereami ep9k$ cp -r /Users/ep9k/Desktop/Key-LogEcovaluator/whereami /Users/ep9k/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins

whereami ep9k$ cp -a /Users/ep9k/Desktop/Key-LogEcovaluator/whereami /Users/ep9k/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins

I'm met with the following message indicating I am not using it correctly: enter image description here

However, I created a "tester" folder on my desktop and can copy to this folder with no problems, using exactly the same command (except with the pathname changed to my tester folder).

I can also copy and paste things to this directory using the GUI "finder". What am I missing?


Solution

  • Your destination path contains at least one whitespace character ("Application Support"), which causes the "cp" command to think it's being given three arguments instead of two. Enclose the destination path in single or double quotes and you should be all right.