Monday, July 16, 2012

Mini How-to : Google Drive under Linux: Synchronize your Google Drive under Linux with grive ! (waiting for the official Google client ^^)

Edit 10/18/2012:
Take a look at new project, it's very easy to install and use, offers much more integration in Linux desktop than grive.

Very great !!!

Official Linux Google drive version is still lacking... if you are as i am addicted to various Google Services this lack is very frustrating ! (what does Google waits for ???)

Fortunately, you can now, thanks to "grive" and its author, synchronize your local documents to your Google Drive in command line :-)

Here's how in a few command lines:

Install grive:

Install grive (under Ubuntu and derived distributions)

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install grive

Configure first launch to authorize grive to access to your Google Drive:

Go to the directory you to be synchronize with Google Drive and configure grive

$ cd <My Local Directory to synchronize>
$ grive
Please go to this URL and get an authentication code:                                                                                       
Please input the authentication code here:   

Open your Web browser, paste this URL and login with your Google account when asked and finally copy the code that Google will provide to paste into the terminal

grive will execute the first synchronization:

Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files

You're done, now every time you want to synchronize your local data with your Google Drive, just enter a terminal, "cd" to your directory and enter "grive" command line.

It is not necessary anymore to run it with "-a" option as its purpose was to configure and associate your computer with your Google drive account, just run grive with no option to initiate synchronization.

You may also want to see others options such as "-v" to enable more verbose mode or "--dry-run" to simulate execution, just see help:

grive --help                                                                                                         
Grive options:                                                                                                                              
  -h [ --help ]         Produce help message                                                                                                
  -v [ --version ]      Display Grive version                                                                                               
  -a [ --auth ]         Request authorization token                                                                                         
  -V [ --verbose ]      Verbose mode. Enable more messages than normal.                                                                     
  -d [ --debug ]        Enable debug level messages. Implies -v.                                                                            
  -l [ --log ] arg      Set log output filename.                                                                                            
  -f [ --force ]        Force grive to always download a file from Google Drive                                                             
                        instead of uploading it.                                                                                            
  --dry-run             Only detect which files need to be uploaded/downloaded,                                                             
                        without actually performing them.  

Really great work from the author (see man):

       The software was developed by Nestal Wan.                                                                                            
       This manpage was written by Jose Luis Segura Lucas (   

Now we (all Linux Google services users) are still waiting from Google to finally provide us their official client... Google listen to us, it would be nice not to forgive Linux users :-)

No comments:

Post a Comment

Please feel free to comment ^^