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 founder of iGeeksBlog.com who has a keen eye for news, rumors and all the unusual stuff that happens around iPhone and iPad.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Apple Files Six New Apple Watch Models in Eurasian Database

After 2018 iPhones, it is 2018 Apple Watch Series 4. A French website Consomac spotted new Apple Watch model identifiers Apple has filed in...

20 Paid iPad and iPhone Apps Gone Free Today – 20 August 2018

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

26 iPad and iPhone Apps Price Drop – 20 August 2018

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...

8 Tips to Charge iPhone Faster: Cut Down the Sluggishness

I hate to see my iPhone running out of steam and bringing everything that I'm doing at a standstill. And when I have to...