Page 2 – Copying and Moving Files and Folders
Copy Folders
Copying a folder (a.k.a. a directory) is similar to the copy file command, except we need to add the -a option:
cp -a ~/Desktop/foldername ~/Library/Mobile\ Documents/com~apple~CloudDocs/
Moving Files and Folders
Instead of copying, you can move a file to change its location:
mv ~/Desktop/filename.zip ~/Library/Mobile\ Documents/com~apple~CloudDocs/
This command works for both files and folders.