Friday, July 20, 2018

How to Upload the files to gdrive through command line or over SSH | Linux | Google Cloud

Hello Everyone…Welcome to TechPunch
In this tutorial I am going to show you how to upload the files to Google drive through Command Line.


I had compiled an Android OS and after done the compiling. I was thought what to do with that rom.zip file. Where should i upload it?
As all knows Google drive is the fastest accessible drive in all storage drives and i found a way to upload the files to gdrive. So i thought to share this with you all so let’s begin with this post. You can use this method to upload the files from your local Ubunut/Linux machine also.
gdrive, not to be mistaken for Google Drive itself, is a command line tool by Petter Rasmussen for Linux, Windows and OSX. Just what I needed. It’s proved itself so useful that I can’t imagine how I lived without it.

Linux :

Step 1 – SSH on to your linux box and download the Linux version of gdrive from GitHub.
cd ~
wget https://docs.google.com/uc?id=0B3X9GlR6EmbnWksyTEtCM0VfaFE&export=download
Step 2 – You should see a file in your home directory start with uc= something. Rename this file to gdrive. In my case the filename is (uc\?id\=O9d3F9GlR6ErbnWksyTEttGdbf).
mv uc\?id\=O9d3F9GlR6ErbnWksyTEttGdbf gdrive

Step 3 – Assign this file executable rights.
chmod +x gdrive

Step 4 – Install the file to your usr folder.
sudo install gdrive /usr/local/bin/gdrive

Step 5 – You’ll need to tell Google Drive to allow this program to connect to your account. To do this, run the gdrive program with any parameter and copy the text it gives you to your browser. Then paste in to your SSH window the response code that Google gives you.Run the following.
gdrive list

Step 6 – YOU ARE DONE! Now you can upload files as required.
gdrive upload filenmae

Youtube Video Link for Step by Step Tutorial :- 


Thanks for Visting..
Keep Supporting. (Tech Punch)

2 comments:

  1. its not working anymore..
    Sign in with Google temporarily disabled for this app

    This app has not yet been verified by Google in order to use Google Sign in.

    ReplyDelete
  2. yeah, still don't work https://prnt.sc/r68ahv

    ReplyDelete