Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get access to Google Drive from terminal

I am new to mac yosemite I have the list of my folder "Google Drive" I can see this from ls -la command , but when I want to cd to it it said not exist ? enter image description here

How can I actually get access to this drive via terminal ?

like image 981
JPC Avatar asked Dec 05 '22 04:12

JPC


2 Answers

Arguments to commands in Bash (the language used in Terminal) are separated by spaces. So when you write cd Google Drive, you're passing two arguments to cd - Google and Drive. cd is just ignoring the second argument and trying to cd into the directory called Google, which doesn't exist.

In order to cd into Google Drive, you need to write cd Google\ Drive or cd "Google Drive". The \ escapes the space character and treats it as a single string.

like image 113
GravityScore Avatar answered Mar 01 '23 07:03

GravityScore


For anyone looking for how to do this after Drive's recent updates... at the moment (June 2022) Drive files are stored in the following location:

/Users/_USERNAME_/Library/CloudStorage/_DRIVE_FOLDER_NAME_

If you are looking to access your files in a terminal window, the easiest way to get there may simply be to do the following:

  • Open a Finder window
  • If it's not already showing, go to the View menu and click "View Path Bar"
  • In the path bar (at the bottom of your Finder window), right-click on the home folder for your Google Drive account and click "Open in Terminal"
like image 35
jetsetter Avatar answered Mar 01 '23 07:03

jetsetter