I am trying to link up (create a copy) of a folder in the User's Libraryinto the iCloud Drive folder, so that it will be synchronised across computers should I need to change machine. For your knowledge, this folder contains app settings that are not easily accessible if I had to do a format or system reset.

Operating the tar cvfz command on the Users/< username >/Mobile\ Documentsfolder does perform some action in Terminalbut it doesn't actually create any copy of the desired folder.

To test if I was doing something wrong I changed the destination folder to the Downloadsfolder and, magic, it worked. Have I to assume that one doesn't have permissions to write to the iCloud Drive directory from the Terminal?

All of this is being attempted on a 2016 15" MacBook Pro with macOS 10.12.6.

  • Please add the specific commands you've used, and the errors you've got (ideally by copy/paste from Terminal). – nohillside Nov 7 '17 at 8:13
  • No error was thrown by the Terminal, it seems like it did the job just the folder did not get created in my iCloud Drive directory. Here is the specific command tar cvfz /Users/username/Library/Mobile\ Documents/Avid_Backup.tgz /Users/username/Library/Application\ Support/Avid/Sibelius (I have obviously written my shortname instead of username) – NotationMaster Nov 7 '17 at 8:39

You need to place the file in this folder instead:

~/Library/Mobile\ Documents/com~apple~CloudDocs

This is where you can place generic files, similar to saving them in "iCloud Drive" in the Finder.

Also you seem to have the order of arguments to tar wrong, so that you're really creating a file named "z" instead of "Avid_Backup.tgz" that you thought you were saving to.

The commands thus needs to be:

  tar -cvzf "~/Library/Mobile\ Documents/com~apple~CloudDocs/Avid_Backup.tgz" "~/Library/Application\ Support/Avid/Sibelius"
  • Great! I'll try it at once! The folder I'm trying to copy contains also some items I do not really need. How could I select only the 3-4 folders inside the /Sibelius directory I need (if at all possible)? I also suppose that, after the CloudDocs/ path I may add any subfolder I would possibly like to nest it into, right? Thanks for your help! – NotationMaster Nov 7 '17 at 9:57
  • Change you ~/Library/Application\ Support/Avid/Sibelius path into one of the specific paths you want to include, and add extra paths at the end of the command. – jksoegaard Nov 7 '17 at 12:52
  • Thanks, this worked! I had to remove the "around the paths though. Normal? The extra paths I want to add, just separated by a simple space right? – NotationMaster Nov 7 '17 at 12:54
  • Yes, just seperate by a space. It is OK to remove the "'s – jksoegaard Nov 7 '17 at 12:56
  • If I didn’t remove them Terminal told me it could not find the path... thanks anyway! Now everything works :) – NotationMaster Nov 7 '17 at 13:03

You must log in to answer this question.

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