How to Access iCloud Drive Using Terminal on Mac

Some advanced users may need to access iCloud Drive via Terminal on Mac. Hence, we thought it's apt to make a quick guide about it.

Developers or advanced users may need to access iCloud Drive from the command line on Mac. Though the process is not so straightforward, it’s not difficult either.

So long as you know the command line, you can quickly copy and even move files to iCloud via Terminal on your Mac. Before going ahead with the process, you need to ensure that iCloud Drive is enabled on your Mac. If it’s not already, click on Apple Menu → System Preferences (or simply click on System Preferences icon) → iCloud and make sure it’s enabled. Besides, ensure that you have the proper Internet connection to access iCloud Drive and iCloud Drive files and documents using Terminal.

Sponsored Links

How to Access iCloud Drive Using Terminal on Mac

How to Access iCloud Drive Using Command Line on Mac

Note:

The command line path to iCloud Drive in macOS is:

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

Sponsored Links

The “~” tilde is a shortcut for the current users home directory. However, you have the option to illustrate it based on your need.

To access iCloud Drive in the Terminal on your Mac, you need to use “cd” command and then select the directory of the iCloud documents path.

To do so, use the following command:

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

Sponsored Links

Then, press the Return key to access iCloud Drive folder.

That’s it! Now, you will have access to iCloud Drive folder. Now, go ahead with your work.

How to Move Files to iCloud Drive by Terminal in Mac

Using command line, you can also move a file to iCloud Drive. It will upload to iCloud Drive and remove it from its original place. To do so, use the mv command.

mv ~/Desktop/images.jpeg ~/Library/Mobile\ Documents/com~apple~CloudDocs/

Sponsored Links

Now, your files will upload to the iCloud server.

How to Copy Files to iCloud Drive via Terminal on Mac

With the use of cp command, you can copy files to iCloud Drive via Terminal. The copied files are uploaded iCloud.

cp ~/Desktop/images.jpeg ~/Library/Mobile\ Documents/com~apple~CloudDocs/

That’s pretty much it!

Sponsored Links

Your take:

You’d like to take a peek at these posts as well:

Enjoyed this article? Download our app and stay connected with us via Facebook, Twitter, and Google Plus to read more such helpful guides.

Jignesh Padhiyarhttps://www.igeeksblog.com
Jignesh Padhiyar is the co-founder of iGeeksBlog.com who has a keen eye for news, rumors and all the unusual stuff that happens around Apple products. During his tight schedule, Jignesh finds some moments of respite to share side-splitting contents on social media.

Latest Articles

Sluggish Sales Relegate Apple to Lower Position: Fast Company

Apple is relegated to the seventeenth position in the list of the World's Most Innovative Companies, 2019. As per the list published by Fast...

22 iPad and iPhone Apps Price Drop – 21 February 2019

What happens when you come to know that one of your favorite iPhone/iPad apps price has just dropped-and available at a huge discount? A...

29 Paid iPad and iPhone Apps Gone Free Today – 21 February 2019

iOS Games Gone Free TodayiOS Apps Gone Free TodayWhile there are tons of awesome apps available for free, a number of extraordinary ones come...

Best Drones of 2019: Fly High in the Sky Without Wings

Drones are the new cool gadgets, and they are indeed here to stay. Right from playing on the farm or doing professional photography, drones...